Commit 43b3fd5
authored
refactor(cubestore): Replace invalidate_tables_cache flag with generi… (#10683)
Introduce a generic `set_post_commit_callback` on `BatchPipe<S>` that fires after a
successful RocksDB commit on the RW-loop thread. This replaces the hard-coded
`invalidate_tables_cache` boolean flag, which was a hack that also ran before the
actual commit.
- `BatchPipe` is now generic over a store type `S` (defaults to `()`), allowing
callbacks to receive a typed store reference
- `RocksMetaStore::write_operation` passes `&RocksMetaStore` to callbacks, giving
them direct access to `cached_tables` and other metastore state
- Moved `cached_tables` from `RocksStore` to `RocksMetaStore` where it belongs
- Cache invalidation now only happens when the commit actually succeeds
- `RocksTable` methods are generic over `S` so they work with any `BatchPipe<S>`1 parent 1fab8f1 commit 43b3fd5
File tree
5 files changed
+486
-616
lines changed- rust/cubestore/cubestore/src
- cachestore
- metastore
5 files changed
+486
-616
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
| 508 | + | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
| |||
0 commit comments