Archived
test: verify DSpark device KV rollback
This commit is contained in:
1 parent
e14463b8eb
commit
c96cfc9e7b
8 files changed
+418
-11
No files matched your search
@@ -19,6 +19,9 @@
|
||||
#include "ngram.h"
|
||||
|
||||
#include <chrono>
|
||||
#ifdef RAD_ENABLE_KV_ROLLBACK_TEST_HOOK
|
||||
#include <functional>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <unordered_map>
|
||||
@@ -495,6 +498,13 @@ public:
|
||||
int64_t chunk_end(const Request& r, int64_t n_target) const;
|
||||
|
||||
private:
|
||||
#ifdef RAD_ENABLE_KV_ROLLBACK_TEST_HOOK
|
||||
friend class Engine;
|
||||
/* Test-build-only observer at the concrete rollback operation. */
|
||||
void set_kv_rollback_test_hook(std::function<void(uint64_t, int, int, int64_t, bool)> hook) {
|
||||
kv_rollback_test_hook_ = std::move(hook);
|
||||
}
|
||||
#endif
|
||||
Program* prog_ = nullptr;
|
||||
Config cfg_{};
|
||||
ChunkGeometry geo_{};
|
||||
@@ -512,6 +522,9 @@ private:
|
||||
* step, so plan_chunk called directly answers for a span. */
|
||||
bool span_now_ = true;
|
||||
IKVManager* kv_ = nullptr;
|
||||
#ifdef RAD_ENABLE_KV_ROLLBACK_TEST_HOOK
|
||||
std::function<void(uint64_t, int, int, int64_t, bool)> kv_rollback_test_hook_;
|
||||
#endif
|
||||
IPrefixCache* pc_ = nullptr;
|
||||
|
||||
/* Does a prefix-cache hit leave a hole in a block drafter's own KV? Only if some paged group
|
||||
|
||||
Reference in new issue
Block a user