Repository navigation
Commit 95fb2a3
authored
Run RocksDB CI tests against the Ubuntu librocksdb package (#4446)
The sei-db workflow rebuilt RocksDB 8.9.1 from source on every cache
miss, threaded the result through a custom cache key, `ldconfig`, and
hand-rolled `CGO_CFLAGS`/`CGO_LDFLAGS`, all to run a sub-second test
suite. Ubuntu 24.04's universe repo ships `librocksdb-dev` 8.9.1-2 — the
same upstream version the job pinned — so the workflow now installs it
with `apt-get` and drops the clone, `make shared_lib`, cache,
`ldconfig`, and CGO plumbing. The runner is pinned to `ubuntu-24.04` so
the distro's RocksDB version stays deterministic when `ubuntu-latest`
rolls forward.
One wrinkle: the distro build keeps assertions enabled where the CI
source build set `-DNDEBUG`, and it catches a real handle leak.
`grocksdb.OpenDbColumnFamilies` returns handles for both the `default`
column family (which RocksDB requires to be opened) and `state_storage`,
but only `state_storage` was kept; the default handle's reference
survived until `rocksdb_close`, which trips the `ColumnFamilySet`
`last_ref` assertion. `OpenRocksDB`/`OpenRocksDBAndTrimHistory` now
return a `ColumnFamilies` struct naming both handles, and
`Database.Close` destroys them before closing the DB.
Validated by running the full `db_engine/rocksdb` suite in an
`ubuntu:24.04` container against the apt package: it passes, and each
run is faster — ~10s of apt instead of a ~20-minute source build on
cache miss, with no cache or library-path setup on hit.1 parent 1d8e5f7 commit 95fb2a3
3 files changed
Lines changed: 45 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
57 | 35 | | |
58 | 36 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 37 | + | |
| 38 | + | |
63 | 39 | | |
64 | 40 | | |
65 | 41 | | |
| |||
69 | 45 | | |
70 | 46 | | |
71 | 47 | | |
72 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
81 | | - | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
86 | | - | |
| 90 | + | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
| |||
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
111 | | - | |
| 115 | + | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
| |||
505 | 510 | | |
506 | 511 | | |
507 | 512 | | |
508 | | - | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
509 | 521 | | |
510 | 522 | | |
511 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
| |||
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
90 | | - | |
| 97 | + | |
91 | 98 | | |
92 | 99 | | |
93 | | - | |
| 100 | + | |
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
99 | | - | |
| 106 | + | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
| |||
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
121 | | - | |
| 128 | + | |
122 | 129 | | |
123 | 130 | | |
124 | | - | |
| 131 | + | |
125 | 132 | | |
0 commit comments