A few sync_local simplifications - #219
Draft
simolus3 wants to merge 3 commits into
Draft
Conversation
simolus3
marked this pull request as draft
September 8, 2026 11:38
Contributor
Author
|
Sorry for the noise, while working on raw tables more I realized there are additional changes I want to include here. |
simolus3
force-pushed
the
sync-local-refactor
branch
from
September 9, 2026 07:53
ea9b215 to
6e5227b
Compare
simolus3
added this pull request to stack #222
September 9, 2026 08:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
sync_localis called for partial checkpoints, we currently pass a JSON array of bucket names around in Rust. This PR simplifies that by passing the actual bucket names around as a vector of string references, and only serializes to JSON in the single place where we bind them to a SQL query.I have also experimented with an approach splitting the statements (first finding updated rows, then looking up the latest oplog entry in a separate prepared statement) which avoids the serialization entirely, but causes many more reads in the sync local performance test.
Additionally, this changes how statements used to forward writes in
sync_localare created: Instead of having separate branches for raw and mananged tables in the oplog loop, this prepares statements for managed views throughPreparedPendingStatement. This is mainly a preparation for a third type of table (managed by the core extension while using direct columns), but is also a simplification.AI use: Reviewed with Claude Code.