Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
bb76f0f
fix(postgres): cancel deadlocked write transactions instead of failin…
yesyayen Oct 1, 2026
e98cb7a
fix(postgres): stop a write transaction once its validation answer is…
yesyayen Oct 1, 2026
8721971
test: cap the 5xx a contended transaction run may return
yesyayen Oct 1, 2026
4cad9fc
docs: describe write transaction contention and lock order
yesyayen Oct 1, 2026
fa2be33
test: pin that an invalid first op answers without waiting on later l…
yesyayen Oct 1, 2026
0a7112b
style: backtick the SQLSTATE names in the conflict classifier doc
yesyayen Oct 1, 2026
f06a12a
fix(postgres): keep the SQLSTATE on the queue writes inside a write t…
yesyayen Oct 6, 2026
63ea708
test: fail a cut-short conflict run, and check the final images
yesyayen Oct 6, 2026
74bffbe
docs: say which items a conflict cancellation names
yesyayen Oct 6, 2026
251b5da
test: race write transactions that read missing items
yesyayen Oct 5, 2026
4932bdd
fix(postgres): hold the key of a missing item a write transaction reads
yesyayen Oct 5, 2026
7eb6ba0
docs: describe how write transactions isolate missing items
yesyayen Oct 5, 2026
7b3fa82
fix(postgres): fail a write transaction whose reserved key was not de…
yesyayen Oct 5, 2026
cee04e8
test: cover a range table and a Delete that loses its key reservation
yesyayen Oct 5, 2026
ad146b4
docs: say which writers wait for a reserved key
yesyayen Oct 5, 2026
67778ee
docs: say that a rollback also releases a reserved key
yesyayen Oct 5, 2026
019297a
test: expect the missing-item races to fail on MongoDB for now
yesyayen Oct 5, 2026
1c4bd1d
test: tighten the missing-item delete check and make the MongoDB mark…
yesyayen Oct 6, 2026
2c16808
test: check that readers neither see nor wait on a reserved key
yesyayen Oct 6, 2026
42cffcb
docs: note what a key reservation costs, and fix the SQLite doc's claim
yesyayen Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,14 @@ jobs:
# The control plane for vector indexes is not reachable over the wire while
# this backend declares no vector search capability, so its tests drive the
# storage layer directly against this job's PostgreSQL. The PutItem create
# race tests hold a create open in an outside transaction, which also needs
# direct access. They build their own throwaway databases; the connection
# string is the server, not a database.
# race tests hold a create open in an outside transaction, and the
# write-transaction conflict tests force a deadlock; both also need direct
# access. They build their own throwaway databases; the connection string is
# the server, not a database.
- name: Run PostgreSQL storage-level tests
env:
EXTENDDB_TEST_PG_CONNECTION_STRING: postgresql://postgres:devpass@127.0.0.1:5432
run: cargo test --release -p extenddb-storage-postgres --test vector_control_plane --test put_create_race
run: cargo test --release -p extenddb-storage-postgres --test vector_control_plane --test put_create_race --test twi_conflict

# The daemonized server logs to syslog; dump it so server-side failures
# are diagnosable from the job log.
Expand Down
10 changes: 10 additions & 0 deletions crates/core/src/types/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,16 @@ impl CancellationReason {
}
}

/// Create a reason for an item that another transaction holds.
#[must_use]
pub fn transaction_conflict() -> Self {
Self {
code: "TransactionConflict".to_owned(),
message: Some("Transaction is ongoing for the item".to_owned()),
item: None,
}
}

/// Create a reason for a validation error.
#[must_use]
pub fn validation_error(msg: impl Into<String>) -> Self {
Expand Down
4 changes: 2 additions & 2 deletions crates/storage-postgres/src/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ macro_rules! bind_sk_fetch_optional {
.await
}
}
.map_err(|e| extenddb_storage::error::StorageError::Internal(e.to_string()))
.map_err($crate::data::index::db_error)
};
}

Expand Down Expand Up @@ -124,7 +124,7 @@ macro_rules! bind_sk_execute {
.await
}
}
.map_err(|e| extenddb_storage::error::StorageError::Internal(e.to_string()))
.map_err($crate::data::index::db_error)
};
}

Expand Down
Loading
Loading