Commit 04855d7
committed
fixup! Implement tiered storage
Respect inner sync store semantics in TierStore
and FFI store bridging
Here we rework TierStore's `KVStoreSync` implementation
so that synchronous calls no longer route through TierStore's
own runtime and async helpers. Instead, sync operations now
delegate through dedicated sync internal helpers that call
the underlying stores' `KVStoreSync` methods directly.
This preserves backend-specific sync behavior for wrapped stores,
including stores that intentionally use a different execution
strategy for synchronous operations than for async ones.
In particular, it avoids forcing inner stores through TierStore's
runtime when the inner store already defines its own sync
semantics.
As part of this change:
- remove the `Runtime` dependency from `TierStore`
- update `TierStore::new` and its call sites accordingly
- add sync internal helpers for read/write/remove/list routing
- add sync primary/backup helpers mirroring the async dual-store
behavior
- share ephemeral routing and primary/backup result handling across
sync and async paths to reduce duplication
We also update `FfiDynStore`'s sync write/remove path to avoid
directly calling `tokio::sync::Mutex::blocking_lock` on a Tokio
runtime worker thread. The sync path now goes through a small
helper that uses `block_in_place` when already inside a runtime,
preventing panics in runtime-backed test scenarios such as
`start_stop_reinit`, and many others.
The net effect is:
- TierStore sync operations now honor the inner store's sync
contract
- FFI-backed sync writes/removals no longer panic when invoked
from within a Tokio runtime
- TierStore construction and tests are simplified by dropping
the now-unused runtime plumbing1 parent e5e1378 commit 04855d7
2 files changed
+326
-90
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
841 | | - | |
842 | | - | |
| 841 | + | |
843 | 842 | | |
844 | 843 | | |
845 | 844 | | |
| |||
0 commit comments