Fix op checkpoint JSONB binding#2293
Open
uncfreak1255-code wants to merge 4 commits into
Open
Conversation
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.
Summary
recordCompletedsoop_checkpoints.completed_keysis written as a real JSONB array on Postgres, not a JSON string scalar.Upstream comparison
Compared against #2288: same root cause, but this branch binds a wrapper object and extracts
completed_keysserver-side via($3::jsonb)->'completed_keys'. That keeps the existing direct-pool write path while avoidingJSON.stringify(sorted)double-encoding.The first PR I opened from this machine (#2292) was closed because it was based on the fork master lineage and included unrelated history. This is the rebuilt upstream-based PR.
Proof receipts
bun run verify->[verify-parallel] elapsed=95s | pass=30 fail=0 | all checks greenbun test test/op-checkpoint.test.ts->31 pass, 0 failscripts/check-jsonb-pattern.sh-> all three JSONB/max_stalled checks OKpgvector/pgvector:pg16Postgres E2E:DATABASE_URL=postgresql://postgres:postgres@localhost:5435/gbrain_test bun test test/e2e/op-checkpoint-jsonb-postgres.test.ts->1 pass, 0 failSELECT jsonb_typeof(completed_keys), completed_keys->>0, jsonb_array_length(completed_keys) ...->array|chunk-a|2