Skip to content

Benchmark recovery after a crash - #45

Merged
venkat1701 merged 3 commits into
mainfrom
feat/bench-crash-recovery
Oct 4, 2026
Merged

venkat1701 merged 3 commits into
mainfrom
feat/bench-crash-recovery

Conversation

@venkat1701

Copy link
Copy Markdown
Collaborator

Closes #36

reopen closes the store cleanly first. The new recover workload doesn't:

  1. The run starts a second JVM (Comparison crash) with the same flags and classpath. It ingests nodes into a fresh directory and prints the count after every acknowledged commit.
  2. Once half the nodes are acknowledged, the parent kills it with destroyForcibly (SIGKILL).
  3. The parent times opening the directory, then counts the nodes that are there.

The report shows the open time in the main table, and acknowledged nodes lost in the Resources table. That row is shown even when both are 0, since 0 is the point. The result depends on timing, so Results agree is n/a.

ingestNodes takes an optional callback per commit, both adapters can count their nodes, and HStoreStore can open an existing directory without redefining its types. Store creation in Comparison moved into one open helper that the run, the crash child and the recovery share.

One limit, which the docs spell out: SIGKILL is a process crash, not a power cut. Whatever an engine has handed to the OS survives it even without an fsync. So this measures recovery time and in-process buffering, not whether sync reaches the disk. Torn writes and lost fsyncs are what CrashRecoveryTest is for.

Smoke runs at scale 1, one each. Both children were killed at 25,000 of 50,000 acknowledged nodes, and no child processes were left behind.

HStore HyperGraphDB
recover, async 79 ms 286 ms
recover, sync 86 ms 190 ms
acknowledged nodes lost (both modes) 0 0

A child JVM ingests nodes and prints every acknowledged commit. The
parent kills it with SIGKILL halfway, times opening the directory and
counts how many acknowledged nodes are missing. HStoreStore can now open
an existing directory without redefining its types.
@venkat1701
venkat1701 merged commit d366da2 into main Oct 4, 2026
@venkat1701
venkat1701 deleted the feat/bench-crash-recovery branch October 6, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Benchmark only measures clean reopen

1 participant