Skip to content

chore(zero-cache): handle NULL current_query() and log unparseable ddl events#5944

Merged
darkgnotic merged 1 commit into
mainfrom
darkgnotic/debug-null-query-from-ddl-event
May 8, 2026
Merged

chore(zero-cache): handle NULL current_query() and log unparseable ddl events#5944
darkgnotic merged 1 commit into
mainfrom
darkgnotic/debug-null-query-from-ddl-event

Conversation

@darkgnotic
Copy link
Copy Markdown
Contributor

For debugging a unexpected parse error when handling a ddl event message:

TypeError: Expected string at context.query. Got null: Expected string at context.query. Got null

Context:

@darkgnotic darkgnotic requested a review from arv May 8, 2026 20:43
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
replicache-docs Ready Ready Preview, Comment May 8, 2026 8:43pm
zbugs Ready Ready Preview, Comment May 8, 2026 8:43pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🐰 Bencher Report

Branchdarkgnotic/debug-null-query-from-ddl-event
TestbedLinux
Click to view all benchmark results
BenchmarkFile SizeBenchmark Result
kilobytes (KB)
(Result Δ%)
Upper Boundary
kilobytes (KB)
(Limit %)
zero-package.tgz📈 view plot
🚷 view threshold
2,095.50 KB
(+0.03%)Baseline: 2,094.89 KB
2,136.79 KB
(98.07%)
zero.js📈 view plot
🚷 view threshold
276.42 KB
(0.00%)Baseline: 276.42 KB
281.95 KB
(98.04%)
zero.js.br📈 view plot
🚷 view threshold
73.63 KB
(0.00%)Baseline: 73.63 KB
75.11 KB
(98.04%)
🐰 View full continuous benchmarking report in Bencher

@darkgnotic darkgnotic enabled auto-merge May 8, 2026 20:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🐰 Bencher Report

Branchdarkgnotic/debug-null-query-from-ddl-event
Testbedself-hosted-metal
Click to view all benchmark results
BenchmarkThroughputBenchmark Result
operations / second (ops/s)
(Result Δ%)
Lower Boundary
operations / second (ops/s)
(Limit %)
src/db/pg-copy.bench.ts > pg-copy benchmark > copy📈 view plot
🚷 view threshold
18.16 ops/s
(+0.84%)Baseline: 18.00 ops/s
17.38 ops/s
(95.72%)
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🐰 Bencher Report

Branchdarkgnotic/debug-null-query-from-ddl-event
Testbedself-hosted-metal
Click to view all benchmark results
BenchmarkThroughputBenchmark Result
operations / second (ops/s) x 1e3
(Result Δ%)
Lower Boundary
operations / second (ops/s) x 1e3
(Limit %)
src/client/custom.bench.ts > big schema📈 view plot
🚷 view threshold
35.09 ops/s x 1e3
(-1.87%)Baseline: 35.75 ops/s x 1e3
33.14 ops/s x 1e3
(94.47%)
src/client/zero.bench.ts > basics > All 1000 rows x 10 columns (numbers)📈 view plot
🚷 view threshold
1.12 ops/s x 1e3
(+1.97%)Baseline: 1.10 ops/s x 1e3
1.01 ops/s x 1e3
(90.15%)
src/client/zero.bench.ts > pk compare > pk = N📈 view plot
🚷 view threshold
19.00 ops/s x 1e3
(-0.66%)Baseline: 19.13 ops/s x 1e3
16.93 ops/s x 1e3
(89.10%)
src/client/zero.bench.ts > with filter > Lower rows 500 x 10 columns (numbers)📈 view plot
🚷 view threshold
1.53 ops/s x 1e3
(+0.97%)Baseline: 1.51 ops/s x 1e3
1.33 ops/s x 1e3
(87.01%)
🐰 View full continuous benchmarking report in Bencher

@darkgnotic darkgnotic added this pull request to the merge queue May 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🐰 Bencher Report

Branchdarkgnotic/debug-null-query-from-ddl-event
Testbedself-hosted-metal
Click to view all benchmark results
BenchmarkThroughputBenchmark Result
operations / second (ops/s)
(Result Δ%)
Lower Boundary
operations / second (ops/s)
(Limit %)
src/btree-set.bench.ts > BTreeSet iterator next() in isolation > forward iterator next()📈 view plot
🚷 view threshold
121,251.75 ops/s
(+0.28%)Baseline: 120,916.89 ops/s
118,976.62 ops/s
(98.12%)
src/btree-set.bench.ts > BTreeSet iterator next() in isolation > forward iterator next() from mid📈 view plot
🚷 view threshold
241,608.30 ops/s
(+0.78%)Baseline: 239,733.39 ops/s
230,298.43 ops/s
(95.32%)
src/btree-set.bench.ts > BTreeSet iterator next() in isolation > reverse iterator next()📈 view plot
🚷 view threshold
118,779.82 ops/s
(+0.68%)Baseline: 117,981.38 ops/s
116,250.10 ops/s
(97.87%)
src/btree-set.bench.ts > BTreeSet iterator next() in isolation > reverse iterator next() from mid📈 view plot
🚷 view threshold
236,889.39 ops/s
(+0.97%)Baseline: 234,618.27 ops/s
231,684.36 ops/s
(97.80%)
src/btree-set.bench.ts > BTreeSet iterators > [Symbol.iterator]() full scan📈 view plot
🚷 view threshold
127,066.76 ops/s
(+0.37%)Baseline: 126,597.34 ops/s
124,746.19 ops/s
(98.17%)
src/btree-set.bench.ts > BTreeSet iterators > values() full scan📈 view plot
🚷 view threshold
123,096.70 ops/s
(+0.04%)Baseline: 123,052.48 ops/s
120,719.88 ops/s
(98.07%)
src/btree-set.bench.ts > BTreeSet iterators > valuesFrom() from mid📈 view plot
🚷 view threshold
261,548.22 ops/s
(+1.09%)Baseline: 258,720.33 ops/s
253,797.99 ops/s
(97.04%)
src/btree-set.bench.ts > BTreeSet iterators > valuesFromReversed() from mid📈 view plot
🚷 view threshold
250,519.56 ops/s
(-0.28%)Baseline: 251,233.02 ops/s
244,230.63 ops/s
(97.49%)
src/btree-set.bench.ts > BTreeSet iterators > valuesReversed() full scan📈 view plot
🚷 view threshold
126,971.11 ops/s
(-0.13%)Baseline: 127,134.98 ops/s
124,251.73 ops/s
(97.86%)
src/btree-set.bench.ts > BTreeSet lookups > get() hit📈 view plot
🚷 view threshold
5,812,662.34 ops/s
(+0.44%)Baseline: 5,787,180.15 ops/s
5,624,990.40 ops/s
(96.77%)
src/btree-set.bench.ts > BTreeSet lookups > has() hit📈 view plot
🚷 view threshold
5,791,122.56 ops/s
(+0.90%)Baseline: 5,739,714.37 ops/s
5,521,260.17 ops/s
(95.34%)
src/btree-set.bench.ts > BTreeSet lookups > has() miss📈 view plot
🚷 view threshold
7,864,146.69 ops/s
(+0.91%)Baseline: 7,793,550.36 ops/s
7,486,405.12 ops/s
(95.20%)
src/btree-set.bench.ts > BTreeSet mutations > add() 100 sequential keys📈 view plot
🚷 view threshold
72,453.97 ops/s
(-0.86%)Baseline: 73,084.33 ops/s
63,475.36 ops/s
(87.61%)
src/btree-set.bench.ts > BTreeSet mutations > add() 1000 sequential keys📈 view plot
🚷 view threshold
6,215.50 ops/s
(-0.45%)Baseline: 6,243.76 ops/s
5,986.03 ops/s
(96.31%)
src/btree-set.bench.ts > BTreeSet mutations > add() then delete() single key📈 view plot
🚷 view threshold
4,225,027.24 ops/s
(+0.40%)Baseline: 4,208,230.18 ops/s
4,152,667.22 ops/s
(98.29%)
src/btree-set.bench.ts > BTreeSet mutations > fromSorted() 100 sequential keys📈 view plot
🚷 view threshold
542,717.42 ops/s
(-1.05%)Baseline: 548,455.33 ops/s
527,047.83 ops/s
(97.11%)
src/btree-set.bench.ts > BTreeSet mutations > fromSorted() 1000 sequential keys📈 view plot
🚷 view threshold
70,880.58 ops/s
(-3.36%)Baseline: 73,342.90 ops/s
48,614.41 ops/s
(68.59%)
src/btree-set.bench.ts > BTreeSet mutations > getOrCreateIndex pattern (new): sort + fromSorted()📈 view plot
🚷 view threshold
25,918.66 ops/s
(-0.91%)Baseline: 26,157.16 ops/s
23,135.03 ops/s
(89.26%)
src/btree-set.bench.ts > BTreeSet mutations > getOrCreateIndex pattern (old): add() loop after sort📈 view plot
🚷 view threshold
3,910.79 ops/s
(-0.72%)Baseline: 3,939.24 ops/s
3,796.57 ops/s
(97.08%)
src/size-of-value.bench.ts > getSizeOfValue performance > arrays > large array (100 items)📈 view plot
🚷 view threshold
853,166.48 ops/s
(-0.06%)Baseline: 853,712.91 ops/s
842,037.87 ops/s
(98.70%)
src/size-of-value.bench.ts > getSizeOfValue performance > arrays > small array (10 items)📈 view plot
🚷 view threshold
6,724,563.97 ops/s
(-1.49%)Baseline: 6,826,255.11 ops/s
6,698,687.28 ops/s
(99.62%)
src/size-of-value.bench.ts > getSizeOfValue performance > datasets > large dataset (100x512B)📈 view plot
🚷 view threshold
22,441.20 ops/s
(-4.32%)Baseline: 23,454.15 ops/s
22,344.94 ops/s
(99.57%)
src/size-of-value.bench.ts > getSizeOfValue performance > datasets > small dataset (10x256B)📈 view plot
🚷 view threshold
223,568.52 ops/s
(-3.11%)Baseline: 230,738.34 ops/s
218,795.57 ops/s
(97.87%)
src/size-of-value.bench.ts > getSizeOfValue performance > objects > nested object📈 view plot
🚷 view threshold
1,954,429.21 ops/s
(-1.46%)Baseline: 1,983,388.34 ops/s
1,872,210.06 ops/s
(95.79%)
src/size-of-value.bench.ts > getSizeOfValue performance > objects > structured object (1KB)📈 view plot
🚷 view threshold
2,265,723.72 ops/s
(-3.62%)Baseline: 2,350,885.90 ops/s
2,208,529.32 ops/s
(97.48%)
src/size-of-value.bench.ts > getSizeOfValue performance > objects > structured object (256B)📈 view plot
🚷 view threshold
2,232,226.57 ops/s
(-4.49%)Baseline: 2,337,108.77 ops/s
2,200,118.59 ops/s
(98.56%)
src/size-of-value.bench.ts > getSizeOfValue performance > primitives > boolean📈 view plot
🚷 view threshold
44,111,974.47 ops/s
(+1.33%)Baseline: 43,534,165.27 ops/s
39,795,738.68 ops/s
(90.22%)
src/size-of-value.bench.ts > getSizeOfValue performance > primitives > integer📈 view plot
🚷 view threshold
44,344,882.97 ops/s
(+1.76%)Baseline: 43,579,139.42 ops/s
40,210,617.21 ops/s
(90.68%)
src/size-of-value.bench.ts > getSizeOfValue performance > primitives > null📈 view plot
🚷 view threshold
44,245,273.83 ops/s
(+1.65%)Baseline: 43,527,215.01 ops/s
40,033,873.50 ops/s
(90.48%)
src/size-of-value.bench.ts > getSizeOfValue performance > primitives > string (100 chars)📈 view plot
🚷 view threshold
520,920.27 ops/s
(-0.11%)Baseline: 521,495.85 ops/s
515,204.02 ops/s
(98.90%)
src/tdigest.bench.ts > TDigest Benchmarks > add📈 view plot
🚷 view threshold
1.70 ops/s
(-0.89%)Baseline: 1.71 ops/s
1.66 ops/s
(98.06%)
src/tdigest.bench.ts > TDigest Benchmarks > addCentroid📈 view plot
🚷 view threshold
1.36 ops/s
(+0.39%)Baseline: 1.36 ops/s
1.32 ops/s
(96.84%)
src/tdigest.bench.ts > TDigest Benchmarks > addCentroidList📈 view plot
🚷 view threshold
1.37 ops/s
(+0.18%)Baseline: 1.37 ops/s
1.33 ops/s
(97.44%)
src/tdigest.bench.ts > TDigest Benchmarks > merge > addCentroid📈 view plot
🚷 view threshold
13,894.41 ops/s
(+4.08%)Baseline: 13,349.30 ops/s
9,671.97 ops/s
(69.61%)
src/tdigest.bench.ts > TDigest Benchmarks > merge > merge📈 view plot
🚷 view threshold
15,608.12 ops/s
(+1.62%)Baseline: 15,358.58 ops/s
11,725.90 ops/s
(75.13%)
src/tdigest.bench.ts > TDigest Benchmarks > quantile📈 view plot
🚷 view threshold
1.68 ops/s
(+0.22%)Baseline: 1.67 ops/s
1.63 ops/s
(97.44%)
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🐰 Bencher Report

Branchdarkgnotic/debug-null-query-from-ddl-event
Testbedself-hosted-metal

⚠️ WARNING: Truncated view!

The full continuous benchmarking report exceeds the maximum length allowed on this platform.

🐰 View full continuous benchmarking report in Bencher

Merged via the queue into main with commit 1fa0f6b May 8, 2026
27 checks passed
@darkgnotic darkgnotic deleted the darkgnotic/debug-null-query-from-ddl-event branch May 8, 2026 21:02
Copy link
Copy Markdown
Contributor

@arv arv left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants