test: verify DSpark device KV rollback

This commit is contained in:
Constantin committed 2026-11-03 13:56:46 -05:00
1 parent e14463b8eb
commit c96cfc9e7b
8 files changed
+418 -11

No files matched your search

+7
View File
@@ -2571,7 +2571,14 @@ int Scheduler::commit(StepResult& res) {
/* Not while a step issued ahead writes past `valid`; that step's commit rolls back to
* the end it reaches. */
if (a < e.n_spec && !(next_open_ && s.entry_next >= 0)) {
#ifdef RAD_ENABLE_KV_ROLLBACK_TEST_HOOK
if (kv_rollback_test_hook_) kv_rollback_test_hook_(r.id, e.n_spec, a, valid, true);
#endif
int st = kv_->rollback(r.id, valid);
#ifdef RAD_ENABLE_KV_ROLLBACK_TEST_HOOK
if (st >= 0 && kv_rollback_test_hook_)
kv_rollback_test_hook_(r.id, e.n_spec, a, valid, false);
#endif
if (st < 0) RAD_WARN("kv rollback for request %llu: %s",
(unsigned long long)r.id, rad_strerror(st));
}