Skip to content

fix(storage-sqlite): keep each partition key in one parallel Scan segment - #1087

Merged
LeeroyHannigan merged 12 commits into
mainfrom
fix/1046-sqlite-scan-segments
Dec 3, 2026
Merged

LeeroyHannigan merged 12 commits into
mainfrom
fix/1046-sqlite-scan-segments

Conversation

@LeeroyHannigan

@LeeroyHannigan LeeroyHannigan commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Changes since the last review

  • 8fe573f merges main at c8e66fb. Two files conflicted. In crates/storage-sqlite/src/data/query_scan.rs, fix(deps): move to sqlx 0.9.1 for the SQLite fix of RUSTSEC-2026-0459 #1166 (sqlx 0.9.1) changed the rowid query of the start-key check, which this PR deletes. The merge keeps the check of this PR. In docs/manuals/07-upgrade-manual.md, chore(release): bump version to 1.1.0 #1514 moved the ClientRequestToken entry, and the entry of this PR sat after the old place. The merge keeps the entry of main. The entry of this PR becomes "v1.2.0: SQLite parallel Scan segments follow the partition key". It goes after the v1.2.0 entries of main, because the v1.1.0 release of 27 Nov 2026 does not include this change. Its text names 1.1.0 where it named 1.0.0.
  • fa15752 adds a unit test next to scan_segment in crates/storage/src/util/scan_segment.rs, with fixed segments. k0, k1 and k2 with 3 segments give 0, 1 and 0, and k0 with 1,000,000 segments gives 500,351. A count above u32::MAX gives the whole CRC32 of k0, and a count of 1, 0 or -3 gives segment 0. With the hash changed to crc32fast::hash(pk).wrapping_add(1) % total, the test fails at k0 with 3 segments. Without the clamp to 1, it fails at the count of 0.
  • Testing done names the command of each lib test count. At b3baff0, cargo test -p extenddb-storage --lib gives 290 passed. The 292 of the last body came from one run of five packages: cargo test -p extenddb-storage -p extenddb-storage-sqlite -p extenddb-storage-mongodb -p extenddb-storage-cassandra -p extenddb-wasm-adapter --lib. The backend crates turn on the test-util feature of extenddb-storage in their dev-dependencies, so that run compiled two more storage tests.

Before that, since 7274a30:

  • 9b59815 merges main at 5252eda, four commits after the last merge of main. None of the four changes a file of this PR, so the merge has no conflict.
  • 8a8261a adds a data table and a dual-target test to tests/test_scan_segments.py for the start-key check of a parallel Scan. The table holds the answers that DynamoDB gave in us-east-1 at 09:22 UTC on 17 Nov 2026, each request sent twice. A start key of an existing item from another segment gets 400 ValidationException. The same key gets the same answer after the test deletes its item. A deleted start key from segment 0 gets 200. The test asserts the status, the error type and the full message by equality.
  • b3baff0 adds the entry for this change to the section "Behavior Changes by Release" of docs/manuals/07-upgrade-manual.md, as v1.1.0. 8fe573f makes it a v1.2.0 entry.
  • ce5ceb0 fixes two comments in crates/storage-sqlite/Cargo.toml. The crate also registers extenddb_scan_segment through libsqlite3-sys, and on wasm32 sqlite_util.rs calls the C ABI of sqlite-wasm-rs to register it.
  • 8e2f0eb deletes a paragraph of the scan_key_in_segment doc. It said that a backend whose segments depend on storage identity must accept a start key that it cannot resolve. The reason it gave was that DynamoDB accepts a start key that no longer exists. After this PR no backend assigns segments by storage identity, and DynamoDB refuses a deleted start key from another segment. The doc of the Cassandra scan_key_in_segment_impl loses the clause that named the paragraph.
  • 116a1dd dates the paged-segment expectation of scan_segment_tests.rs and tests/test_scan_segments.py to the measurement with Limit 1 on 17 Nov 2026.

What

On SQLite, a parallel Scan now returns all items of a partition key from one segment, on a table and on a GSI. A row goes to segment crc32(partition key text) % TotalSegments. The MongoDB backend already uses this rule.

  • scan_impl filters with a SQL function, extenddb_scan_segment(pk, total), which each connection of the engine's pool registers in after_connect. The function calls scan_segment in extenddb_storage::util. sqlx has no API for a scalar function, so the registration calls sqlite3_create_function_v2 through libsqlite3-sys. The crate already uses libsqlite3-sys for the backup API. On wasm32 the registration calls the same C function through sqlite-wasm-rs, the SQLite that the crate's wasm_sqlx shim drives. The shim gets lock_handle and as_raw_handle, the names sqlx gives them, so both targets register the function with the same code.
  • The start-key check computes the segment from the key with composite_pk_to_text, the text that the pk column stores. It no longer reads the row. So ExtendDB refuses a start key from another segment, also when its item no longer exists. It accepts a deleted start key from the same segment. DynamoDB gave both answers on 17 Nov 2026.
  • The MongoDB scan filter and start-key check call the same scan_segment, so one function computes the segment on both backends. A unit test next to scan_segment pins its segments for fixed keys and counts.
  • The SQL function answers NULL for a NULL pk. If SQLite cannot convert a value to text, the function reports an out of memory error.

Why

DynamoDB returns all items of a partition key from one segment. It did so on a table and on a GSI in us-east-1 on 13 and 14 Nov 2026, and each Scan went out twice. SQLite put a row in a segment by its rowid, so the items of one partition key came back from two or more segments. PostgreSQL, MongoDB and Cassandra already keep each partition key in one segment.

Closes #1046

Other open PRs

A Scan of a GSI with two HASH attributes stops after the first page of the Scan, or of each segment, on SQLite. That code is older than this PR, and #1083 tracks it.

Testing done

  • At fa15752, cargo test -p extenddb-storage --lib gives 291 passed, the new scan_segment test among them. With --features test-util it gives 295 passed.
  • cargo test -p extenddb-storage-sqlite --lib at fa15752: 336 passed, 2 failed, 1 ignored. The 2 failures are backup_catalog::write_lock_tests, which fail the same way on main in the test environment, at a file owner check (storage-sqlite: the two write_lock_tests fail when an ancestor of the Cargo target directory is owned by another user #1414). The data-table test of scan_segment_tests.rs scans 11 segment counts on a table, on a GSI and on a GSI with two HASH attributes.
  • At 7274a30, with the rowid predicate back, that test failed with partition key p0 came back from segments 0 and 1. With the start-key check on the first HASH attribute only, the row of the GSI with two HASH attributes failed.
  • At fa15752, cargo test -p extenddb-storage-cassandra --lib gives 192 passed. cargo test -p extenddb-storage-mongodb --lib gives 197 passed, and cargo ignored the 84 tests that need a server.
  • At fa15752, tests/test_scan_segments.py (37 cases) and tests/test_read_paging.py passed 52 tests against a SQLite server. They passed 52 tests against a MongoDB server on a one-node replica set of MongoDB 7.0.45. Both servers come from a build at fa15752.
  • On the code of main, the new wire file fails 27 of its 37 cases in each of two runs. Those runs used the production files of 5252eda and the tests of b3baff0. The start-key row for a deleted key from another segment gets 200 there.
  • A program that copies the two MongoDB segment checks of main and scan_segment of b3baff0 compares them for every TotalSegments from 1 to 1,000,000. All 592,000,000 sampled comparisons agree, and so do the 296,148,000 comparisons that cover every segment of 1 to 2,000 segments.
  • At fa15752, cargo +1.97.0 fmt --all -- --check is clean. Both clippy commands of .github/workflows/clippy.yml with -D warnings are clean on extenddb-storage, extenddb-storage-sqlite, extenddb-storage-mongodb, extenddb-storage-cassandra and extenddb-wasm-adapter, and so is cargo +1.94.0 check --all-targets on the same crates. --collect-only collects 7341 tests in tests/ and 820 in tests/python, with no error.
  • At fa15752, cargo test -p extenddb-wasm-adapter --lib --test parity passes (4 tests). At 7274a30, with the registration call deleted from after_connect, the parity case failed with InternalServerError. cargo test -p extenddb-storage-postgres --test doc_version_literals passes (3 tests).
  • At fa15752, the clippy step of .github/workflows/wasm.yml passes. fix(core): read the latency segment clock through web_time #1482, now on main, fixed the WebAssembly build that fix(metrics): bound latency segment memory by summing into fixed time buckets #398 broke. The wasm32 test suites need wasm-bindgen-test-runner, which the test host does not have, so they did not run locally. In CI the WebAssembly workflow runs them, and its corpus step runs the new case on wasm32.
  • On the SQLite server of the last round (a debug build at 116a1dd), a full Scan of 20,000 items took 0.71 to 0.86 s. The four segments of TotalSegments 4 took 0.67 to 0.73 s together. Each set ran three times, with a host load average of 19 to 22.

Line counts at fa15752: production +164 -122, tests +555 -21, docs +11 -1.

Checklist

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace)
  • Code is formatted (cargo fmt --check)
  • Clippy is clean (cargo clippy -- -W clippy::pedantic)
  • I have added or updated tests for new functionality
  • I have updated documentation if behavior changed
  • Breaking changes are noted below (if any)
  • If this changes the wire protocol, Storage trait, auth model, on-disk
    format, or public CLI surface, an RFC has been accepted or is linked
    below. Otherwise, an ADR captures the decision (link below).

ADR / RFC: n/a

Breaking changes

On SQLite, the segment of an item in a parallel Scan changes from rowid % TotalSegments to crc32(partition key text) % TotalSegments. A parallel Scan that pages across the upgrade sends start keys from the old rule. ExtendDB can refuse such a start key as one from another segment. The later pages use the new rule, so the client can miss items or get items twice. Start such a Scan again after the upgrade. A Scan that pages across a rollback to 1.1.0 can get the same answers.

ExtendDB on SQLite also refuses a start key from another segment when its item no longer exists, as DynamoDB does. The MongoDB backend used the new rule before this change, so its segments stay the same. The upgrade manual describes the change in the entry "v1.2.0: SQLite parallel Scan segments follow the partition key".


By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.

…ment

A parallel Scan on the SQLite backend put a row in a segment by its rowid.
The rowid is the order in which SQLite stored the row, so the items of one
partition key spread over the segments. DynamoDB returns all items of a
partition key from one segment, on a table and on a global secondary index.
Measured in us-east-1 on 13 and 14 Nov 2026, each Scan twice.

The scan predicate now puts a row in a segment by the CRC32 of its pk column
text modulo TotalSegments. The MongoDB backend applies the same rule. A SQL
function, extenddb_scan_segment, evaluates it per row. Every connection of
the engine's pool registers the function when it opens. On a GSI the pk
column holds the index partition key, so the rule applies to it unchanged.

The start-key check applies the same Rust function to the key text. It no
longer reads the row, and a deleted start key still gets a definite answer.

A Scan without Segment, the order of items within a segment, and the other
backends are unchanged.

Fixes #1046.
On SQLite, the start-key check of a parallel Scan hashed the first HASH
attribute of the key. The pk column of an index with two or more HASH
attributes holds the text of all of them, which the scan predicate hashes.
The check therefore refused the LastEvaluatedKey such a Scan had returned.
It now builds the key text with composite_pk_to_text, as the predicate does.

scan_segment moves to a module of its own in extenddb_storage::util. The
SQLite SQL function, the SQLite start-key check and both MongoDB sites call
it, so one rule remains. The clamp of the segment count stays, so a NULL or
0 count in SQL cannot divide by zero.

The SQL function answers NULL only for a NULL pk. When SQLite cannot convert
another value to text, it reports an out of memory error instead.

Tests: the GSI with two HASH attributes is a row of the Rust test's data
table. The in-memory engine helper of the restore job tests is shared.
The wire test pages each segment with the bounded helper, now in conftest.
Repeated comments and a test that repeated the first one are gone.
Main is at 80490c6, 43 commits after the base of this branch. One
file conflicted: crates/storage/src/util/mod.rs. #588 adds mod prefix
and pub use prefix::string_prefix_upper_bound, and this branch adds mod
scan_segment and pub use scan_segment::scan_segment. The merge keeps
all four lines, each list in name order.

Git merged eight other files that both sides change, with no overlap:
Cargo.lock, crates/storage-sqlite/src/data/query_scan.rs,
crates/storage-sqlite/src/lib.rs,
crates/storage-sqlite/src/sqlite_util.rs,
crates/storage-sqlite/src/store.rs, crates/storage/Cargo.toml,
crates/storage/src/lib.rs and tests/conftest.py.
#1009 added the wasm32 build of this crate after this branch added the
SQL function extenddb_scan_segment. After the merge of main, the wasm32
build does not compile. sqlite_util.rs imports libsqlite3_sys, which
the wasm32 build does not have, and the SqliteConnection of the
wasm_sqlx shim has no lock_handle method.

On wasm32, sqlite_util.rs takes SQLite's C API from sqlite-wasm-rs,
which exports the same names and types. Both targets use the same
scan_segment_sql. The shim gets lock_handle and as_raw_handle, the names
sqlx gives them, so register_scan_segment is the same code on both
targets. The Scan SQL calls the function on both targets, so the
wasm32 build must register it too.

The parity corpus gets a parallel Scan of the Page table, segment 0 of
3. It counts the two keys whose CRC32 modulo 3 is 0, k0 and k2. CI's
test job runs the corpus natively, and the corpus step of the
WebAssembly workflow runs it on wasm32.
Main is at 5252eda. The last merge of main was at 80490c6, and
main has four commits since then: #864, #895, #929 and #949. They
change CI workflows, the auth and fuzz crates, a PostgreSQL test and
the security manual. None of them changes a file that this branch
changes, so git merged them with no conflict.
…mments

The comment on libsqlite3-sys named only the online-backup copy. Since
9067287 the crate also registers the SQL function
extenddb_scan_segment through it.

The comment on sqlite-wasm-rs said that the wasm_sqlx shim stands in
for sqlx and libsqlite3-sys. Since 7274a30, sqlite_util.rs also
calls the sqlite-wasm-rs C ABI to register the function on wasm32. Both
comments now name the function.
The paragraph said that a backend whose segments depend on storage
identity must accept a start key that it cannot resolve. Its reason
was that DynamoDB accepts an ExclusiveStartKey that no longer exists.
After this branch, no backend assigns segments by storage identity.
PostgreSQL, MongoDB and SQLite hash the key text, and Cassandra
computes token(?) of it. DynamoDB also refuses a deleted start key from
another segment (us-east-1, 17 Nov 2026, each request sent twice).

The doc of the Cassandra scan_key_in_segment_impl named the rule of
that paragraph, so this commit deletes that clause too.
The measurement of 13 and 14 Nov 2026 has no Limit. The expectation for
paged segments comes from a measurement in us-east-1 on 17 Nov 2026. It
used a GSI with two HASH attributes, 12 items, TotalSegments 3 and
Limit 1. Each pair of HASH values came back from one segment, and each
item came back once.
On main, SQLite read the row of the start key to find its segment, and
it accepted a start key that had no row. This branch computes the
segment from the key, so ExtendDB refuses a start key from another
segment also when its item no longer exists. No test sent a deleted
start key or checked the refusal message.

A new data table in tests/test_scan_segments.py holds the answers that
DynamoDB gave in us-east-1 at 09:22 UTC on 17 Nov 2026, each request
sent twice. The table has 20 items keyed on pk S HASH, and each Scan
reads Segment 0 of TotalSegments 4 with ConsistentRead. The test finds
the segment of each key on the target first.

- A start key of an existing item from another segment: 400
  ValidationException with the full message.
- The same key after the test deletes its item: 400 with the same
  message.
- A deleted start key from segment 0: 200. The row checks the status
  only, because the items after the start key depend on the hash of
  the target.
On SQLite, a parallel Scan that pages across the upgrade can be
refused, miss items or get items twice. The section Behavior Changes by
Release of the upgrade manual now says so, with the clients it affects
and what to do. The entry goes after the last v1.1.0 entry of the
section.
@navareamol navareamol self-assigned this Nov 25, 2026

@navareamol navareamol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one test request and one number I cannot reproduce.

  1. Nothing outside the wasm corpus pins the hash that scan_segment uses. scan_segment_tests.rs and tests/test_scan_segments.py check that each partition key comes from one segment and each item once. They pass for any hash that the scan filter and the start-key check share. I changed scan_segment in crates/storage/src/util/scan_segment.rs to crc32fast::hash(pk).wrapping_add(1) % total on b3baff0. scan_segment_tests passed, cargo test -p extenddb-storage --lib passed (290), and only the extenddb-wasm-adapter parity case "Scan Page with Segment 0 of 3 counts k0 and k2" failed. That case runs the SQLite path. The description says the MongoDB segments stay the same. I think a changed hash would move MongoDB segments and no MongoDB test would fail. Could you add a unit test next to scan_segment with fixed values (k0, k1, k2 with 3 segments give 0, 1, 0) and the clamp (total_segments 0, 1 and a negative value)?

  2. The description says cargo test -p extenddb-storage --lib gives 292 passed at b3baff0. I get 290 passed, 0 failed at that commit. The other counts match (storage-sqlite 330 with the two write_lock_tests passing here, storage-mongodb 190 and 84 ignored, storage-cassandra 192). Which command gives 292? If it needs a feature flag, could the description say which?

The branch has a merge conflict with main, so it needs a merge of main before it can land.

I will approve once the test in point 1 is added.

Two files conflicted. In crates/storage-sqlite/src/data/query_scan.rs, main
(#1166) changed the rowid query of the start-key check, which this branch
deletes, so the merge keeps the check of this branch. In
docs/manuals/07-upgrade-manual.md, main (#1514) moved the ClientRequestToken
entry, and this branch added its entry after the old place. The merge keeps
the ClientRequestToken entry of main. The entry of this branch becomes
"v1.2.0: SQLite parallel Scan segments follow the partition key". It goes
after the v1.2.0 entries of main, because v1.1.0 does not include this change.
Its text names 1.1.0 as the release before the change.
A unit test next to scan_segment checks fixed segments. k0, k1 and k2 with 3
segments give 0, 1 and 0, and k0 with 1,000,000 segments gives 500,351. A
count above u32::MAX gives the whole CRC32 of k0. A count of 1, 0 or -3 gives
segment 0. Before, only the parity case of the wasm adapter pinned the hash.
The SQLite and MongoDB scan filters and start-key checks call this function.
So a change to the hash or to the clamp now fails a test of extenddb-storage.
@LeeroyHannigan

Copy link
Copy Markdown
Collaborator Author

@navareamol

  1. fa15752 adds the test next to scan_segment in crates/storage/src/util/scan_segment.rs. One data table checks k0, k1 and k2 with 3 segments (0, 1, 0) and k0 with 1,000,000 segments (500,351). It also checks k0 with a count above u32::MAX, which gives the whole CRC32 of k0. The rows for the clamp have counts of 1, 0 and -3, which give 0. With your change, crc32fast::hash(pk).wrapping_add(1) % total, the test fails at k0 with 3 segments (1 where 0 is expected). With the clamp removed, it fails at the count of 0. The MongoDB filter and start-key check call the same function, so this test holds the MongoDB segments too.

  2. cargo test -p extenddb-storage --lib gives 290 at b3baff0, as you found. The 292 came from one run of five packages: cargo test -p extenddb-storage -p extenddb-storage-sqlite -p extenddb-storage-mongodb -p extenddb-storage-cassandra -p extenddb-wasm-adapter --lib. The backend crates turn on the test-util feature of extenddb-storage in their dev-dependencies, so that run compiled two more storage tests. The body now names the command of each count. At fa15752, cargo test -p extenddb-storage --lib gives 291 passed, and with --features test-util it gives 295.

8fe573f merges main at c8e66fb and resolves the conflicts in query_scan.rs and the upgrade manual. The entry is now a v1.2.0 entry, because v1.1.0 does not include this change.

LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
…rder

The branch of #1220 is at 57c4d7a, which merges main at 5826e1b.
This branch last had it at 4f3e0f2, with main at c8e66fb.

Git merged docs/manuals/07-upgrade-manual.md with no conflict. #1087
added its v1.2.0 entry after the other v1.2.0 entries of main. The entry
of #1220 and the entry of this branch follow it, in that order. No other
file that this branch changes moved.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 5826e1b. This branch last had main at c8e66fb. Since
then, four PRs merged into main: #1446, #1531, #1466 and #1087.

One file conflicted. In docs/manuals/07-upgrade-manual.md, #1087 added
its v1.2.0 entry after the other v1.2.0 entries of main, where this
branch has its entry. The merge keeps the entries of main first, then
the entry of this branch.

Main changed no other file that this branch changes.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 5826e1b, one commit past b6c8595: #1087. #1087 adds its
v1.2.0 entry to "Behavior Changes by Release" in
docs/manuals/07-upgrade-manual.md after the other v1.2.0 entries of
main, where this branch has its entry. That is the one conflict. The
merge keeps both entries without change: the entry of #1087 first, then
the entry of this branch, before the v1.1.0 entries. No other file has
changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 5826e1b, three commits past c057660: #1531, #1466 and
#1087. In docs/manuals/07-upgrade-manual.md, #1531 adds a v1.2.0 entry
at the top of "Behavior Changes by Release", and git merged it with no
conflict. #1087 adds its v1.2.0 entry after the other v1.2.0 entries of
main, where this branch has its entry. That is the one conflict. The
merge keeps both entries without change: the entry of #1087 first, then
the entry of this branch, before the v1.1.0 entries. No other file has
changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 5826e1b, three commits past c057660: #1531, #1466 and
#1087. In docs/manuals/07-upgrade-manual.md, #1531 adds a v1.2.0 entry
at the top of "Behavior Changes by Release", and git merged it with no
conflict. #1087 adds its v1.2.0 entry after the other v1.2.0 entries of
main, where this branch has its entry. That is the one conflict. The
merge keeps both entries without change: the entry of #1087 first, then
the entry of this branch, before the v1.1.0 entries.

Git merged three other files with no conflict:

- crates/storage-sqlite/src/data/data_engine.rs: #1087 changes
  scan_key_in_segment to compute the segment from the key, with no read
  of the data table. This branch maps the error of a dropped data table
  to StorageError::TableNotFound in the other data-plane calls, and it
  does not change scan_key_in_segment.
- crates/storage-sqlite/src/lib.rs: #1087 declares the
  scan_segment_tests module, and this branch declares
  deleting_window_data_tests.
- crates/storage-cassandra/tests/direct_integration.rs: #1531 declares
  the update_item_retry module, and this branch declares
  deleting_window.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 5826e1b, three commits past c057660: #1531, #1466 and
#1087. In docs/manuals/07-upgrade-manual.md, #1531 adds a v1.2.0 entry
at the top of "Behavior Changes by Release", and git merged it with no
conflict. #1087 adds its v1.2.0 entry after the other v1.2.0 entries of
main, where this branch has its entry. That is the one conflict. The
merge keeps both entries without change: the entry of #1087 first, then
the entry of this branch, before the v1.1.0 entries.

No other file has changes on both sides. #1087 changes how SQLite puts
items in parallel Scan segments. This branch changes the Scan request
checks in crates/engine, and #1087 changes no file in that crate.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 5826e1b, three commits past c057660: #1531, #1466 and
#1087. In docs/manuals/07-upgrade-manual.md, #1531 adds a v1.2.0 entry
at the top of "Behavior Changes by Release", and git merged it with no
conflict. #1087 adds its v1.2.0 entry after the other v1.2.0 entries of
main, where this branch has its entry. That is the one conflict. The
merge keeps both entries without change: the entry of #1087 first, then
the entry of this branch, before the v1.1.0 entries. No other file has
changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 44a7b79, four commits past db8a90d: #1466, #1087, #768
and #1296. #1087 adds its v1.2.0 entry to
docs/manuals/07-upgrade-manual.md after the other v1.2.0 entries of
main, where this branch has its entry. That is the one conflict. The
merge keeps both entries without change: the entry of #1087 first, then
the entry of this branch, before the v1.1.0 entries.

Git merged three other files with no conflict:

- CONTRIBUTING.md: #1466 describes devtools/freeze-migrations in the
  step that freezes the released bodies. This branch gives the example
  migration the id 14 and adds migration 13 to the list of ids in use.
- crates/storage-mongodb/src/data_engine.rs: #1087 computes the
  parallel Scan segment with scan_segment in scan_key_in_segment and in
  scan_impl. This branch changes other functions.
- crates/storage/src/util/mod.rs: #1087 declares and exports
  scan_segment, and this branch declares and exports control_chars.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 44a7b79, five commits past c057660: #1531, #1466, #1087,
#768 and #1296. In docs/manuals/07-upgrade-manual.md, #1531 adds a
v1.2.0 entry at the top of "Behavior Changes by Release", and git
merged it with no conflict. #1087 adds its v1.2.0 entry after the other
v1.2.0 entries of main, where this branch has its entry. That is the one
conflict. The merge keeps both entries without change: the entry of
#1087 first, then the entry of this branch, before the v1.1.0 entries.

Git merged crates/storage-sqlite/src/data/query_scan.rs with no
conflict. #1087 replaces the rowid rule of the parallel Scan with the
SQL function extenddb_scan_segment. It computes the segment of a start
key from the key alone. This branch sets creation_date_time in
the TableKeyInfo of the test helper key_info. The tests that #1087 adds
in crates/storage-sqlite/src/scan_segment_tests.rs build each
TableKeyInfo from a clone, so they need no change for the new field.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 44a7b79, six commits past c8e66fb: #1446, #1531, #1466,
#1087, #768 and #1296. In docs/manuals/07-upgrade-manual.md, #1446 and
#1531 add v1.2.0 entries at the top of "Behavior Changes by Release",
and git merged them with no conflict. #1087 adds its v1.2.0 entry after
the other v1.2.0 entries of main, where this branch has its entry. That
is the one conflict. The merge keeps both entries without change: the
entry of #1087 first, then the entry of this branch, before the v1.1.0
entries.

Git merged five other files with no conflict:

- crates/storage-cassandra/tests/direct_integration.rs: #1531 declares
  the update_item_retry module, and this branch declares
  gsi_backfilling.
- crates/storage-mongodb/src/table_engine.rs: #1446 changes DeleteTable.
  It marks the table DELETING by table_id, and it removes the tags and
  the table document in one transaction. This branch changes
  create_table_impl_inner, index_info_by_table_id_impl and
  doc_to_table_description_in.
- crates/storage-sqlite/src/lib.rs: #1087 declares the
  scan_segment_tests module, and this branch declares
  gsi_backfilling_tests.
- crates/storage-sqlite/src/store.rs: #1087 registers
  extenddb_scan_segment on each connection of the pool. This branch
  adds the gsi_backfills field and gsi_creating_phase_delay.
- crates/storage/src/lib.rs: #1087 rewrites the doc comment of
  scan_key_in_segment, and this branch declares the gsi_backfill
  module.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 44a7b79, five commits past c057660: #1531, #1466, #1087,
#768 and #1296. In docs/manuals/07-upgrade-manual.md, #1531 adds a
v1.2.0 entry at the top of "Behavior Changes by Release", and git
merged it with no conflict. #1087 adds its v1.2.0 entry after the other
v1.2.0 entries of main, where this branch has its entry. That is the one
conflict. The merge keeps both entries without change: the entry of
#1087 first, then the entry of this branch, before the v1.1.0 entries.

Git merged two other files with no conflict:

- crates/storage-mongodb/src/data_engine.rs: #1087 computes the
  parallel Scan segment with scan_segment in scan_key_in_segment and in
  scan_impl. This branch changes the write functions and their retries
  at other lines.
- crates/storage/src/lib.rs: #1087 rewrites the doc comment of
  scan_key_in_segment, and this branch declares the request_clock
  module.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 44a7b79, six commits past c8e66fb: #1446, #1531, #1466,
#1087, #768 and #1296. In docs/manuals/07-upgrade-manual.md, #1446 and
#1531 add v1.2.0 entries at the top of "Behavior Changes by Release",
and git merged them with no conflict. #1087 adds its v1.2.0 entry after
the other v1.2.0 entries of main, where this branch has its entry. That
is the one conflict. The merge keeps both entries without change: the
entry of #1087 first, then the entry of this branch, before the v1.1.0
entries.

Git merged four other files with no conflict:

- Cargo.lock: #1087 adds crc32fast to the dependencies of
  extenddb-storage, and this branch adds form_urlencoded and tempfile to
  the dependencies of extenddb-storage-sqlite.
- crates/storage-sqlite/Cargo.toml: #1087 rewrites the comments of
  libsqlite3-sys and sqlite-wasm-rs. This branch adds form_urlencoded
  and the tempfile dev-dependency.
- crates/storage-sqlite/src/lib.rs: #1087 declares the
  scan_segment_tests module, and this branch declares file_mode and
  sqlite_uri.
- crates/storage-sqlite/src/store.rs: #1087 registers
  extenddb_scan_segment on each connection of the pool, in
  after_connect. This branch calls file_mode::prepare before the pool
  connects, and it removes the mode change after the connect. The pool
  keeps the after_connect of main.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 44a7b79, four commits past db8a90d: #1466, #1087, #768
and #1296. #1087 adds its v1.2.0 entry to
docs/manuals/07-upgrade-manual.md after the other v1.2.0 entries of
main, where this branch has its entry. That is the one conflict. The
merge keeps both entries without change: the entry of #1087 first, then
the entry of this branch, before the v1.1.0 entries.

Git merged two other files with no conflict:

- crates/storage-mongodb/src/data_engine.rs: #1087 computes the
  parallel Scan segment with scan_segment in scan_key_in_segment and in
  scan_impl. This branch changes the TransactWriteItems functions at
  other lines.
- crates/storage/src/lib.rs: #1087 rewrites the doc comment of
  scan_key_in_segment, and this branch adds the transact exports.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 44a7b79, six commits past c8e66fb: #1446, #1531, #1466,
#1087, #768 and #1296. In docs/manuals/07-upgrade-manual.md, #1446 and
#1531 add v1.2.0 entries at the top of "Behavior Changes by Release",
and git merged them with no conflict. #1087 adds its v1.2.0 entry after
the other v1.2.0 entries of main, where this branch has its entry. That
is the one conflict. The merge keeps both entries without change: the
entry of #1087 first, then the entry of this branch, before the v1.1.0
entries. No other file has changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
…-time

The merge takes f583547, the last head of #1093 before main merged
it as 1e2ebdd. The last merge took b8f73c4. Since then, #1093
merged main at 1174651, eight PRs past db8a90d: #1466, #1087,
#768, #1296, #1485, #1228, #1325 and #1443. Git merged without a
conflict. Two files of this branch have changes on both sides:

- crates/storage/src/util/mod.rs: #1087 declares and exports
  scan_segment, and this branch declares and exports throughput.
- docs/differences-from-dynamodb.md: #1443 changes the
  control_plane_delay_seconds default to 0.25 in two rows, and this
  branch adds the LastIncreaseDateTime row to the Control Plane table.
LeeroyHannigan added a commit that referenced this pull request Dec 4, 2026
Main is at 1e2ebdd, ten commits past db8a90d: #1466, #1087,
#768, #1296, #1485, #1228, #1325, #1443, #1269 and the squash commit
of #1093.

One file conflicted: docs/manuals/07-upgrade-manual.md. #1093 adds its
v1.2.0 entry at the top of "Behavior Changes by Release", where this
branch has its entry. The merge keeps both entries without change. The
entry of this branch stays first. The entry of #1093 comes next, above
the other v1.2.0 entries of main. #1087 adds its entry after the other
v1.2.0 entries of main, and git merged it with no conflict.

Git merged four other files with no conflict:

- crates/core/src/validation/mod.rs: #1228 adds the pattern clause for
  an empty value in validate_name_member. This branch declares the
  table_name_length module near the top of the file.
- crates/server/src/table_name_gate.rs: #1296 adds has_no_table_member
  and an arm of check_table_name_chars for the six operations that have
  no table member. This branch checks none of those operations.
- crates/wasm-adapter/parity/corpus.json: #1087 adds a Scan case, and
  #1228 changes the text of a ListBackups case. This branch changes
  other cases.
- docs/manuals/10-security-model.md: #1325 adds the
  Content-Security-Policy line of the console. This branch changes the
  line on the requests that get an answer before the IAM decision.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQLite: a parallel Scan segment holds part of a partition, where DynamoDB keeps all items of a partition key in one segment

2 participants