Review report

core: PR #33324

Design and approach

Clarify the block-file modification-time contract (src/node/blockstorage.cpp:258, head)

Opening the staged replacement with wb creates a new file, and the migration does not restore the source timestamp before activation. This matches the stated backup rationale: size-and-mtime backup tools will recopy rewritten files. But it conflicts with the PR description's claim that modification times are preserved. Preserving timestamps could cause those tools to skip rewritten contents; advancing them can trigger copies of hundreds of gigabytes. Which backup behavior is intended? Align the implementation and user-facing description with that requirement, and explain the consequences for backups.

Establish the Windows durability guarantee used by migration (src/util/fs_helpers.cpp:148, head)

On Windows, DirectoryCommit returns true without synchronizing directory entries. The migration relies on successful directory commits to make staged replacements durable before deleting originals and to activate data files before the target key. Flushing a file's contents alone does not establish the required directory-entry ordering. What Windows/filesystem guarantee is intended to support power-loss recovery? If that guarantee is sufficient, document or substantiate it; otherwise, use a Windows-appropriate durable protocol or narrow the recovery guarantee.

💡 Suggestion

Include the failing operation and OS error in directory-commit diagnostics (src/util/fs_helpers.cpp:145, head)

Directory-commit failures stop the migration, but this message reports only the directory path; the caller then reports only that committing the blocks directory failed. Users following the release-note instruction to correct the filesystem problem cannot tell whether opening, syncing, or closing failed, or see the corresponding OS error. Capture the error at the failing operation and include it in the diagnostic without changing the current failure return or migration ordering.

Review coverage was incomplete. The adversarial review had incomplete evidence. The adversarial_glm review did not complete.