Repository navigation
Commit 23cb854
fix: default MVStore pageSplitSize to 16 KB, not 16 bytes (#1293)
MVStoreModuleBuilder.pageSplitSize is documented as "16 KB" and is passed
straight to MVStore.Builder.pageSplitSize, which takes bytes. Its value was
16, the same literal used for cacheSize (megabytes) and cacheConcurrency (a
count), so every leaf page split as soon as it held more than one entry.
Measured by rebuilding a 146 MB store of 46,926 entries at each setting:
93,781 pages at depth 13 with 16; 36,096 pages at depth 12 with MVStore's
own persistent-store default of 16 KB; 13,327 pages at depth 6 with 64 KB,
the largest value that survives H2's (cacheSize / cacheConcurrency) >> 4
clamp.
The default is now 16 * 1024, matching the javadoc and MVStore's default.
Existing files are unaffected until their pages are rewritten; there is
nothing to migrate. The two tests that pinned the old literal through
Short.SIZE are updated.
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>1 parent a01e120 commit 23cb854
3 files changed
Lines changed: 12 additions & 6 deletions
File tree
- nitrite-mvstore-adapter/src
- main/java/org/dizitart/no2/mvstore
- test/java/org/dizitart/no2/mvstore
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
0 commit comments