fix(zero-cache): correctly return sqlite iterators in table-source#5696
Merged
fix(zero-cache): correctly return sqlite iterators in table-source#5696
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| Branch | mlaw/return |
| Testbed | Linux |
Click to view all benchmark results
| Benchmark | File Size | Benchmark Result kilobytes (KB) (Result Δ%) | Upper Boundary kilobytes (KB) (Limit %) |
|---|---|---|---|
| zero-package.tgz | 📈 view plot 🚷 view threshold | 1,947.00 KB(+0.00%)Baseline: 1,946.95 KB | 1,985.89 KB (98.04%) |
| zero.js | 📈 view plot 🚷 view threshold | 269.32 KB(0.00%)Baseline: 269.32 KB | 274.71 KB (98.04%) |
| zero.js.br | 📈 view plot 🚷 view threshold | 71.30 KB(0.00%)Baseline: 71.30 KB | 72.73 KB (98.04%) |
|
| Branch | mlaw/return |
| Testbed | self-hosted-metal |
Click to view all benchmark results
| Benchmark | Throughput | Benchmark 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 | 23.46 ops/s(-1.16%)Baseline: 23.73 ops/s | 20.17 ops/s (86.00%) |
|
| Branch | mlaw/return |
| Testbed | self-hosted-metal |
Click to view all benchmark results
| Benchmark | Throughput | Benchmark 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 | 104.80 ops/s x 1e3(-4.76%)Baseline: 110.04 ops/s x 1e3 | 93.53 ops/s x 1e3 (89.25%) |
| src/client/zero.bench.ts > basics > All 1000 rows x 10 columns (numbers) | 📈 view plot 🚷 view threshold | 1.36 ops/s x 1e3(+6.94%)Baseline: 1.27 ops/s x 1e3 | 1.08 ops/s x 1e3 (79.49%) |
| src/client/zero.bench.ts > pk compare > pk = N | 📈 view plot 🚷 view threshold | 37.77 ops/s x 1e3(+3.22%)Baseline: 36.59 ops/s x 1e3 | 31.10 ops/s x 1e3 (82.35%) |
| src/client/zero.bench.ts > with filter > Lower rows 500 x 10 columns (numbers) | 📈 view plot 🚷 view threshold | 1.95 ops/s x 1e3(-1.46%)Baseline: 1.98 ops/s x 1e3 | 1.68 ops/s x 1e3 (86.26%) |
|
| Branch | mlaw/return |
| Testbed | self-hosted-metal |
🚨 3 Alerts
| Benchmark | Measure Units | View | Benchmark Result (Result Δ%) | Lower Boundary (Limit %) |
|---|---|---|---|---|
| src/btree-set.bench.ts > BTreeSet iterators > [Symbol.iterator]() full scan | Throughput operations / second (ops/s) x 1e3 | 📈 plot 🚷 threshold 🚨 alert (🔔) | 129.04 ops/s x 1e3(-16.37%)Baseline: 154.30 ops/s x 1e3 | 131.15 ops/s x 1e3 (101.64%) |
| src/tdigest.bench.ts > TDigest Benchmarks > merge > addCentroid | Throughput operations / second (ops/s) x 1e3 | 📈 plot 🚷 threshold 🚨 alert (🔔) | 15.43 ops/s x 1e3(-48.68%)Baseline: 30.07 ops/s x 1e3 | 25.56 ops/s x 1e3 (165.61%) |
| src/tdigest.bench.ts > TDigest Benchmarks > merge > merge | Throughput operations / second (ops/s) x 1e3 | 📈 plot 🚷 threshold 🚨 alert (🔔) | 16.86 ops/s x 1e3(-45.33%)Baseline: 30.84 ops/s x 1e3 | 26.21 ops/s x 1e3 (155.49%) |
Click to view all benchmark results
| Benchmark | Throughput | Benchmark 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 | 132,284.92 ops/s(-5.99%)Baseline: 140,716.28 ops/s | 119,608.84 ops/s (90.42%) |
| src/btree-set.bench.ts > BTreeSet iterator next() in isolation > forward iterator next() from mid | 📈 view plot 🚷 view threshold | 290,995.60 ops/s(+4.17%)Baseline: 279,341.37 ops/s | 237,440.16 ops/s (81.60%) |
| src/btree-set.bench.ts > BTreeSet iterator next() in isolation > reverse iterator next() | 📈 view plot 🚷 view threshold | 146,541.01 ops/s(+1.85%)Baseline: 143,884.99 ops/s | 122,302.25 ops/s (83.46%) |
| src/btree-set.bench.ts > BTreeSet iterator next() in isolation > reverse iterator next() from mid | 📈 view plot 🚷 view threshold | 288,597.19 ops/s(+4.44%)Baseline: 276,317.36 ops/s | 234,869.75 ops/s (81.38%) |
| src/btree-set.bench.ts > BTreeSet iterators > [Symbol.iterator]() full scan | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 129,042.88 ops/s(-16.37%)Baseline: 154,297.66 ops/s | 131,153.01 ops/s (101.64%) |
| src/btree-set.bench.ts > BTreeSet iterators > values() full scan | 📈 view plot 🚷 view threshold | 186,318.85 ops/s(-0.42%)Baseline: 187,102.18 ops/s | 159,036.86 ops/s (85.36%) |
| src/btree-set.bench.ts > BTreeSet iterators > valuesFrom() from mid | 📈 view plot 🚷 view threshold | 314,570.74 ops/s(-6.80%)Baseline: 337,518.89 ops/s | 286,891.05 ops/s (91.20%) |
| src/btree-set.bench.ts > BTreeSet iterators > valuesFromReversed() from mid | 📈 view plot 🚷 view threshold | 328,892.44 ops/s(+8.62%)Baseline: 302,785.79 ops/s | 257,367.92 ops/s (78.25%) |
| src/btree-set.bench.ts > BTreeSet iterators > valuesReversed() full scan | 📈 view plot 🚷 view threshold | 167,300.57 ops/s(-2.78%)Baseline: 172,084.93 ops/s | 146,272.19 ops/s (87.43%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > arrays > large array (100 items) | 📈 view plot 🚷 view threshold | 1,535,382.78 ops/s(+2.36%)Baseline: 1,499,943.29 ops/s | 1,274,951.79 ops/s (83.04%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > arrays > small array (10 items) | 📈 view plot 🚷 view threshold | 12,757,825.19 ops/s(+2.87%)Baseline: 12,401,334.14 ops/s | 10,541,134.02 ops/s (82.62%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > datasets > large dataset (100x512B) | 📈 view plot 🚷 view threshold | 39,522.58 ops/s(+4.19%)Baseline: 37,934.31 ops/s | 32,244.17 ops/s (81.58%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > datasets > small dataset (10x256B) | 📈 view plot 🚷 view threshold | 387,605.59 ops/s(+0.76%)Baseline: 384,672.52 ops/s | 326,971.64 ops/s (84.36%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > objects > nested object | 📈 view plot 🚷 view threshold | 3,383,177.90 ops/s(+1.96%)Baseline: 3,318,140.43 ops/s | 2,820,419.37 ops/s (83.37%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > objects > structured object (1KB) | 📈 view plot 🚷 view threshold | 3,946,946.97 ops/s(+3.46%)Baseline: 3,815,082.70 ops/s | 3,242,820.29 ops/s (82.16%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > objects > structured object (256B) | 📈 view plot 🚷 view threshold | 3,897,153.37 ops/s(+2.08%)Baseline: 3,817,831.50 ops/s | 3,245,156.78 ops/s (83.27%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > primitives > boolean | 📈 view plot 🚷 view threshold | 73,409,449.25 ops/s(+5.43%)Baseline: 69,631,617.01 ops/s | 59,186,874.46 ops/s (80.63%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > primitives > integer | 📈 view plot 🚷 view threshold | 73,635,196.46 ops/s(+6.18%)Baseline: 69,349,998.28 ops/s | 58,947,498.54 ops/s (80.05%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > primitives > null | 📈 view plot 🚷 view threshold | 73,480,381.72 ops/s(+5.70%)Baseline: 69,521,118.80 ops/s | 59,092,950.98 ops/s (80.42%) |
| src/size-of-value.bench.ts > getSizeOfValue performance > primitives > string (100 chars) | 📈 view plot 🚷 view threshold | 791,503.26 ops/s(+1.75%)Baseline: 777,880.14 ops/s | 661,198.12 ops/s (83.54%) |
| src/tdigest.bench.ts > TDigest Benchmarks > add | 📈 view plot 🚷 view threshold | 2.39 ops/s(-0.27%)Baseline: 2.39 ops/s | 2.03 ops/s (85.23%) |
| src/tdigest.bench.ts > TDigest Benchmarks > addCentroid | 📈 view plot 🚷 view threshold | 1.89 ops/s(+1.05%)Baseline: 1.87 ops/s | 1.59 ops/s (84.11%) |
| src/tdigest.bench.ts > TDigest Benchmarks > addCentroidList | 📈 view plot 🚷 view threshold | 1.90 ops/s(-0.65%)Baseline: 1.91 ops/s | 1.62 ops/s (85.56%) |
| src/tdigest.bench.ts > TDigest Benchmarks > merge > addCentroid | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 15,433.11 ops/s(-48.68%)Baseline: 30,069.56 ops/s | 25,559.13 ops/s (165.61%) |
| src/tdigest.bench.ts > TDigest Benchmarks > merge > merge | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 16,858.79 ops/s(-45.33%)Baseline: 30,839.54 ops/s | 26,213.61 ops/s (155.49%) |
| src/tdigest.bench.ts > TDigest Benchmarks > quantile | 📈 view plot 🚷 view threshold | 2.34 ops/s(+0.20%)Baseline: 2.34 ops/s | 1.99 ops/s (84.83%) |
return of iter to where iter is created
arv
pushed a commit
that referenced
this pull request
Apr 17, 2026
…5696) #mapFromSQLiteTypes used to return the iterator via its own finally block, but it is possible that wrappers over `mapFromSQLiteTypes` return before we ever call into `mapFromSQLiteTypes`! When that happens, we leak the SQLite iterator! The work on `cap` found this. Added a test to reproduce the issue.
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.
#mapFromSQLiteTypes used to return the iterator via its own finally block, but it is possible that wrappers over
mapFromSQLiteTypesreturn before we ever call intomapFromSQLiteTypes!When that happens, we leak the SQLite iterator!
The work on
capfound this. Added a test to reproduce the issue.