Release v1.0-RC2 · documentdb/documentdb · GitHub
Skip to content

v1.0-RC2

Pre-release
Pre-release

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 09 Oct 23:33
· 178 commits to main since this release

Changelog

  • Add anonymous usage telemetry to the documentdb-local image, on by default. It reports only the image version, platform and CPU architecture at startup and hourly. Turn it off with DOCUMENTDB_USAGE_TELEMETRY=false, NO_ANALYTICS=1, DO_NOT_TRACK=1 or --disable-usage-telemetry. Native packages are unaffected. See documentdb-local/PRIVACY.md. [Feature]
  • Release executable memory allocated for PCRE2 JIT-compiled regular expressions when their memory context resets. [Bugfix] (work item 5530914)
  • Prevent RUM vacuum from processing internal entry-tree and posting-tree roots as leaf pages after concurrent root splits. [Bugfix]
  • Restore vacuum cost delays and interrupt handling between RUM posting-tree leaf pages. [Bugfix]
  • Keep background index callers waiting after retryable failures, and report an error only after the request becomes terminal. [Bugfix]
  • Promote overflowing 64-bit integer intermediate products to double in covariance and standard-deviation accumulators instead of reporting an internal calculation error. [Bugfix]
  • Fix a backend crash when $getField, $setField or $unsetField were given an input document that constant-folds to a system variable, such as { "$redact": { "$getField": { "field": "f", "input": { "f": "$$PRUNE" } } } }. The parse-time null-check evaluated the input without a lifetime tracker, so materializing a non-inline result dereferenced a null pointer and terminated the backend. [Bugfix]
  • Fix a lock-upgrade deadlock between two overlapping non-concurrent dropIndexes on the same collection by acquiring the final AccessExclusiveLock on the collection table up front instead of upgrading from AccessShareLock. [Bugfix]
  • Fix $near, $nearSphere and $geoNear failing with an internal wrong-order error on a 2dsphere index. The index bound is derived from bounding boxes while the ordering is rechecked with an exact spherical distance, and the two disagree by a sub-micrometre amount for locations that are nearly coincident or that use longitude -180, which violated the ordering guarantee the scan relies on. The index bound now carries a small allowance so it stays a true lower bound. [Bugfix]
  • Allow collMod to convert an eligible existing single-field index into a TTL index when selected by name or key pattern. [Bugfix]
  • Allow nested $lookup stages to run after the parent equality join so enrichment applies only to matched foreign documents. Guarded by the default-off documentdb.force_nested_lookup_pipeline_after_join setting; unsupported query shapes may fail when it is enabled. [Perf]
  • Support collation with the $stdDevPop, $stdDevSamp, $median and $percentile $group accumulators. They only do arithmetic, so the collation is applied when their input expression is evaluated. [Feature]
  • Prevent index-only scans on collated indexes for all field-consuming projection and aggregation targets, while preserving them for constant-only targets such as $count. [Bugfix]
  • Enable targeted posting-tree pruning by default so vacuum takes brief posting-tree root cleanup locks for individual deletion attempts instead of holding one root lock across an entire pruning traversal. [Perf]
  • Enable RUM empty entry-leaf page pruning (documentdb_rum.prune_rum_empty_pages) by default. [Perf]
  • Apply collation to the symbol BSON type, so symbols compare and hash like the equivalent string under the active collation. [Feature]
  • Fix collation-aware hashing and index term generation for code with scope. [Bugfix]
  • Support collation with count command [Feature]
  • Persist and manage custom roles through the data plane: createRole/dropRole/rolesInfo are backed by the roles catalog (keyed by role name). Guarded by documentdb.enableRoleCrud feature flag, disabled by default. [Feature]
  • Report compact's bytesFreed as the measured reduction in on-disk size across the VACUUM instead of a statistics-based bloat estimate, and stop running the expensive bloat estimate query when no freeSpaceTargetMB was requested. [Bugfix/Perf]
  • Fix an internal error for $group over a $sort whose trailing key opposes the composite index direction. Guarded by the default-on documentdb.enable_skip_setting_order_scan_direction_for_full_scan_expr setting. [Bugfix]
  • Fix a gateway panic when the system connection budget exceeds the configured maximum connections. [Bugfix]
  • Fall back to a logical posting-tree sweep when inline RUM vacuum observes a concurrent root split, ensuring dead TIDs are removed from leaves allocated behind the disk-order cursor. [Bugfix]
  • Run the permission check for find and aggregate with batchSize: 0, which returned a cursor on collections the caller could not read. [Bugfix/Security]
  • Fix a crash or wrong results in the no-sort $firstN/$lastN accumulators when a value's size is a multiple of 64 bytes. [Bugfix]
  • Prevent a backend crash by rejecting $documents directly inside a $facet sub-pipeline. [Bugfix]
  • Enforce $facet restrictions on $collStats, $facet, $geoNear, $indexStats, and $planCacheStats in nested $lookup and $unionWith pipelines while preserving parent-stage validation and valid collectionless pipelines. [Bugfix]
  • Keep ordered RUM scans reading a posting tree past a singleton leaf so visible matches in later leaves are not skipped. [Bugfix]
  • Fix ordered scalar-array ($in) index scans across multiple unsatisfiable ranges. Guarded by the default-on documentdb.enable_ordered_saop_multi_range_skip_advance setting. [Bugfix]
  • Exit the gateway with an error instead of panicking when PostgreSQL is unreachable at startup, and stop the background-worker gateway instead of leaving it idle. [Bugfix]
  • Preserve UTF-8 string boundaries in trim expressions and string-to-binData conversions. [Bugfix]
  • Return retryable or specific error codes from the gateway for backend connection, transport, and pool failures and for malformed legacy wire-protocol requests instead of InternalError. [Bugfix]
  • Require insert and/or update permission on a $merge or $out target collection according to the stage's configured actions, instead of only read permission, so a read-only user can no longer write through these stages. [Bugfix/Security]
  • Limit result string size for $concat. [Bugfix]
  • Write the same generated _id to the document and its stored object ID in $merge/$out, so inserted documents without _id are found by _id lookups. Guarded by the default-on documentdb.enable_merge_generated_id_consistency setting. [Bugfix]
  • Harden ordered RUM index scans against an emptied leftmost posting-tree leaf and set the recheck flag on the correct bound. [Bugfix]
  • Apply find, count, and distinct command stages after a view's terminal aggregation stage, preventing grouped views from producing invalid aggregate plans. [Bugfix]
  • Fix a one-byte heap overflow when parsing a bsonsequence from JSON. [Bugfix]
  • Reject non-string values resolved by $meta before accessing string data. [Bugfix]
  • Reject passwords that fail SASLprep in createUser and updateUser before creating or changing native users. [Bugfix] (#765)

How to use

Packages

Version 1.0~rc2: 22 files for PostgreSQL 17/18 on Ubuntu 24.04 and RHEL/Rocky 9, amd64 and arm64. On a clean host, enable PGDG (plus EPEL and CRB on RHEL), install the five packages for your PostgreSQL major in one apt install or dnf install, then run documentdb-setup.

base=https://github.com/documentdb/documentdb/releases/download/v1.0-RC2
mkdir pkgs && cd pkgs && curl -fsSLO "$base/SHA256SUMS"
awk '{print $2}' SHA256SUMS | while read -r f; do curl -fsSLO "$base/$f"; done
sha256sum -c SHA256SUMS

Or let the installer do it on a clean host:

curl -fsSLo documentdb-install.sh https://github.com/documentdb/documentdb/releases/download/v1.0-RC2/install.sh &&
sudo sh documentdb-install.sh --version v1.0-RC2

See the package guide.

Containers

Images for PostgreSQL 15-18, tagged pg15-1.0-rc2 through pg18-1.0-rc2:

docker pull ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0-rc2
docker run -dt -p 10260:10260 --name documentdb-rc2 \
  ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0-rc2 \
  --username <YOUR_USERNAME> --password <YOUR_PASSWORD>

Connect with mongodb://<YOUR_USERNAME>:<YOUR_PASSWORD>@localhost:10260/?tls=true&tlsAllowInvalidCertificates=true. The image sends anonymous usage telemetry by default; add -e DOCUMENTDB_USAGE_TELEMETRY=false to turn it off.