Skip to content

Recover ChangeLogBlocks from ChangeLogFile#10

Merged
tonyastolfi merged 24 commits intomathworks:mainfrom
gabrielbornstein:gbornste/recover-memtable
Mar 17, 2026
Merged

Recover ChangeLogBlocks from ChangeLogFile#10
tonyastolfi merged 24 commits intomathworks:mainfrom
gabrielbornstein:gbornste/recover-memtable

Conversation

@gabrielbornstein
Copy link
Copy Markdown
Collaborator

Includes new functions to recover and initialize ChangeLogBlocks from the ChangeLogFile after the KVStore has been shutdown, and the ChangeLogFile has been written to disk.

Also includes refactoring for the KVStore test suite, so that there is less redundant code, and future tests will be more portable and easier to write.

Note: Some investigation is needed. ChangeLogBlock::verify() is failing, however, we are reading correct and consistent ChangeLogBlock data.

Comment thread conanfile.py Outdated
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_block.cpp
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_file.cpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp
Comment thread src/turtle_kv/change_log_block.hpp
Comment thread src/turtle_kv/change_log_file.cpp Outdated
Comment thread src/turtle_kv/change_log_file.cpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_file.cpp Outdated
Comment thread src/turtle_kv/change_log_file.cpp Outdated
Comment thread src/turtle_kv/change_log_file.cpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_file.cpp Outdated
Comment thread src/turtle_kv/change_log_file.cpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp
Comment thread src/turtle_kv/change_log_block.cpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_block.hpp Outdated
return this->buffer_.size();
}

MutableBuffer buffer()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can be const.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not pushed yet?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Something weird is going on... maybe a UI issue? I can see the const added on the most recent commit here:
https://github.com/gabrielbornstein/turtle_kv/blob/gbornste/recover-memtable/src/turtle_kv/change_log_block.hpp
As well as in my branch, but it isn't showing up in the MR. Maybe it'll get fixed with my next commit? Either way, it should actually be there

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Problem solved; the const should be after the param list.

Comment thread src/turtle_kv/change_log_file.cpp Outdated
Comment thread src/turtle_kv/change_log_file.cpp
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/change_log_file.hpp Outdated
Comment thread src/turtle_kv/kv_store.test.cpp Outdated
Comment thread src/turtle_kv/kv_store.test.cpp Outdated
Comment thread src/turtle_kv/kv_store.test.cpp Outdated
Comment thread src/turtle_kv/kv_store.test.cpp Outdated
Comment thread src/turtle_kv/change_log_block.cpp
@tonyastolfi tonyastolfi merged commit 235f236 into mathworks:main Mar 17, 2026
1 check passed
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