Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

fix(split): add flush_memtable for copy_checkpoint_to_dir #729

Merged
merged 1 commit into from
Feb 1, 2021

Conversation

hycdong
Copy link
Contributor

@hycdong hycdong commented Jan 18, 2021

In pegasus pr 535, we use rocksdb's original API CreateCheckpoint to do checkpoint. In function copy_checkpoint_to_dir_unsafe, it will create a checkpoint without flush memtable, code like below:

// CreateCheckpoint() will not flush memtable when log_size_for_flush = max
status = chkpt->CreateCheckpoint(checkpoint_dir, std::numeric_limits<uint64_t>::max());

When parent partition prepare states for child to learned, it should create a checkpoint with memtable flushed. As a result, this checkpoint will contain more data, less data will be learned during async-learn stage.

This pull request adds flush_memtable option for function copy_checkpoint_to_dir, the pegasus implementation is in pegasus pr 684.

@levy5307 levy5307 merged commit 7404376 into XiaoMi:master Feb 1, 2021
@hycdong hycdong deleted the fix_copy_checkpoint_to_dir branch February 1, 2021 03:15
zhangyifan27 pushed a commit to zhangyifan27/rdsn that referenced this pull request Feb 3, 2021
zhangyifan27 pushed a commit to zhangyifan27/rdsn that referenced this pull request Feb 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants