Skip to content

Rename any cdb files outside of the manifest - #486

Merged
martinsumner merged 4 commits into
develop-3.4from
mas-d34-l.i444-markjournalgarbage
Feb 12, 2026
Merged

Rename any cdb files outside of the manifest#486
martinsumner merged 4 commits into
develop-3.4from
mas-d34-l.i444-markjournalgarbage

Conversation

@martinsumner

Copy link
Copy Markdown
Owner

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.

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.

@ThomasArts ThomasArts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please double check file renaming, I didn't get what actually happened there.

Comment thread src/leveled_inker.erl
Comment thread src/leveled_inker.erl Outdated
martinsumner and others added 3 commits February 9, 2026 15:11
@martinsumner
martinsumner merged commit 8934604 into develop-3.4 Feb 12, 2026
2 checks passed
@martinsumner
martinsumner deleted the mas-d34-l.i444-markjournalgarbage branch February 12, 2026 11:08
martinsumner added a commit to OpenRiak/leveled that referenced this pull request Feb 12, 2026
* 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 added a commit to OpenRiak/leveled that referenced this pull request Feb 12, 2026
Rename any cdb files outside of the manifest (martinsumner#486)
martinsumner added a commit to OpenRiak/leveled that referenced this pull request Feb 12, 2026
* 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 added a commit to OpenRiak/leveled that referenced this pull request Jun 8, 2026
* 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>
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.

2 participants