Skip to content

Revert "Use the HC-Tree journal on flagged leaders and followers" - #2833

Merged
robertjchen merged 1 commit into
mainfrom
robert-revert-2818
Oct 2, 2026
Merged

robertjchen merged 1 commit into
mainfrom
robert-revert-2818

Conversation

@robertjchen

@robertjchen robertjchen commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Details

Reverts #2818.

After #2818, Bedrock crashes on HC-Tree databases even when -hctreeExperimentalMode is not set.
WAL2 databases are fine. We see this every time in a downstream HC-Tree test suite that passed before this merge.

Bedrock crashes in two places, and both look like HC-Tree reporting a corrupt database:

  1. On reads: SQuery hits its "Database corruption was detected" check and exits.
  2. On commit: SQLite::commit fails its check that COMMIT succeeded.

These parts of #2818 still affect HC-Tree with the flag off and are worth checking before re-landing:

  • New databases now get a blank journal row at ID 1. This runs when each SQLite object is created, so it may run more than once on a new database.
  • Journal trimming now deletes with ORDER BY id LIMIT n.
  • Commit lookups (getCommit, getCompressedCommits) use a new query.
  • After a slow commit, hctstats is read with SQuery instead of read().
  • writeLock is held for less time. This probably only matters when BlockWrites is used.

cc @tylerkaraszewski

Fixed Issues

N/A. Unblocks deploys while #2818 is looked into.

Tests

Goes back to the previous code, which passed the same HC-Tree tests. The resulting tree is identical to the commit before #2818 (6df552e).

…-journal-commits"

This reverts commit 740e769, reversing changes made to 6df552e.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 11fbdb2cb1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sqlitecluster/SQLite.cpp
@robertjchen
robertjchen merged commit 4ffbd8e into main Oct 2, 2026
9 of 11 checks passed
@robertjchen
robertjchen deleted the robert-revert-2818 branch October 2, 2026 18:52
@tylerkaraszewski

Copy link
Copy Markdown
Contributor

The Auth-side test compatibility fixes for the re-land are in Auth PR 25180: local test handles now match the servers' native-journal mode, and the query-plan test uses its own table instead of the legacy journal. The affected fixtures pass against both Bedrock versions. The full native Auth suite still has 30 failures, including a reproduced read-corruption error and shutdown hang; details are in the Auth PR.

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.

3 participants