Repository navigation
Description
Describe the bug
documentdb-local rejects transactions using readConcern: { level: "snapshot" } even though its PostgreSQL deployment can provide a stable transaction snapshot through REPEATABLE READ.
The gateway already contains the required mapping:
ReadConcern::SnapshotselectsIsolationLevel::RepeatableReadindocumentdb_gateway_core/src/requests/common_fields.rs.- Transaction validation permits it only when
allow_transaction_snapshot()is enabled indocumentdb_gateway_core/src/requests/validation.rs. - The configuration defaults to
false, so documentdb-local returnsCommandNotSupportedinstead of using the existing implementation.
Environment
- documentdb-local
- Architecture independent
Reproduction Steps
Run a read in a transaction configured with snapshot read concern:
const session = client.startSession();
try {
session.startTransaction({
readConcern: { level: "snapshot" }
});
await collection.findOne({}, { session });
await session.abortTransaction();
} finally {
await session.endSession();
}Expected behavior
The transaction starts successfully and all reads in the transaction use the same PostgreSQL MVCC snapshot through REPEATABLE READ.
For documentdb-local snapshot read concern should be enabled by default.
Actual behavior
The first operation in the transaction fails with error code 115, CommandNotSupported:
'Snapshot' read concern is not supported
Acceptance criteria
- Snapshot read concern is accepted by default in documentdb-local.
- Snapshot transactions use PostgreSQL
REPEATABLE READ. - A concurrency test verifies that two reads in one transaction observe the same snapshot while another connection commits a change between them.
- Existing validation remains available for deployment modes that cannot guarantee a transaction-wide snapshot.
- Unsupported timestamp-selection fields, such as
atClusterTime, are either explicitly rejected or documented separately rather than silently implying point-in-time support.
Additional context
This report was prepared with GitHub Copilot assistance and reviewed by the author before submission.
Activity
documentdb-triage-tool commentedon Sep 18, 2026
👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.
documentdb-triage-tool commentedon Oct 2, 2026
👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.
guanzhousongmicrosoft commentedon Oct 5, 2026
The fix is the gateway default for
mongoAllowTransactionSnapshot(currentlyfalse), or making that default depend on the deployment mode. The container itself has nothing to change. Targeting 1.0; this needs a gateway change.documentdb-triage-tool commentedon Oct 28, 2026
👋 @guanzhousongmicrosoft — this issue has been assigned for 23 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.
documentdb-triage-tool commentedon Nov 17, 2026
👋 @tsharp, @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.