Skip to content

Rename any cdb files outside of the manifest (#486)#20

Merged
martinsumner merged 1 commit intoopenriak-3.4from
nhse-o34-d34upstream
Feb 12, 2026
Merged

Rename any cdb files outside of the manifest (#486)#20
martinsumner merged 1 commit intoopenriak-3.4from
nhse-o34-d34upstream

Conversation

@martinsumner
Copy link

  • Rename any cdb files outside of the manifest

Rename them as *.bak files. This aligns with the ledger, which does the same thing at startup.

These files are expected when a stop or crash happens during a journal compaction. In this case, files may be created - but not added to the manifest. These orphaned files will be in the post_compact folder.

It is less expected for folders in the non-compact area, but can still happen when there is a crash during the delete_pending state.

The garbage is not collected (deleted) - but this just makes it easier for OS admins to clear it, as they don't need erlang functions, *.bak files can be assumed to be garbage.

  • Update src/leveled_inker.erl

  • Add comment following review

  • Format correctly


* Rename any cdb files outside of the manifest

Rename them as *.bak files.  This aligns with the ledger, which does the same thing at startup.

These files are expected when a stop or crash happens during a journal compaction.  In this case, files may be created - but not added to the manifest.  These orphaned files will be in the post_compact folder.

It is less expected for folders in the non-compact area, but can still happen when there is a crash during the delete_pending state.

The garbage is not collected (deleted) - but this just makes it easier for OS admins to clear it, as they don't need erlang functions, *.bak files can be assumed to be garbage.

* Update src/leveled_inker.erl

Co-authored-by: Thomas Arts <thomas.arts@quviq.com>

* Add comment following review

* Format correctly

---------

Co-authored-by: Thomas Arts <thomas.arts@quviq.com>
@martinsumner martinsumner merged commit 6f93c11 into openriak-3.4 Feb 12, 2026
2 checks passed
@martinsumner martinsumner deleted the nhse-o34-d34upstream branch February 12, 2026 12:47
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.

1 participant