Commit 4b24996
fix: use existing page size when opening pre-built database snapshots
The database fixtures are generated on macOS (Apple Silicon, 16KB pages)
but CI runs on Linux (x86_64, 4KB pages). DbEnvBuilder was always
forcing the OS default page size via set_geometry, causing MDBX to
report MDBX_CORRUPTED when the forced page size didn't match the
existing database's page size.
Add `existing_page_size()` to DbEnvBuilder that sets page_size to None,
letting MDBX read the page size from the existing data file. Use it in
Db::open_no_sync which is specifically for opening pre-built snapshots.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 1d5760b commit 4b24996
2 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
75 | 86 | | |
76 | 87 | | |
77 | 88 | | |
| |||
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
88 | | - | |
| 99 | + | |
89 | 100 | | |
90 | 101 | | |
91 | 102 | | |
| |||
0 commit comments