Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mvcc: fix gc bug. #1350

Merged
merged 2 commits into from
Nov 24, 2016
Merged

mvcc: fix gc bug. #1350

merged 2 commits into from
Nov 24, 2016

Conversation

disksing
Copy link
Contributor

If we stop iterating all mvcc versions due to MAX_TXN_WRITE_SIZE limit, we should not delete latest delete before safePoint.

/cc @siddontang @zhangjinpeng1987 @ngaut

@zhangjinpeng87
Copy link
Member

LGTM

1 similar comment
@siddontang
Copy link
Contributor

LGTM

@siddontang
Copy link
Contributor

PTAL @BusyJay

while let Some((commit, write)) = try!(self.reader.seek_write(key, ts)) {
if self.write_size >= MAX_TXN_WRITE_SIZE {
// Cannot remove latest delete when we haven't iterate all versions.
latest_delete = None;
break;
}
if !remove_older {
Copy link
Member

Choose a reason for hiding this comment

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

Can you reduce the if ... {} else {} levels by if ... { ... continue}? This condition block is too long and hard to read.

@disksing
Copy link
Contributor Author

@zhangjinpeng87
Copy link
Member

LGTM

1 similar comment
@BusyJay
Copy link
Member

BusyJay commented Nov 24, 2016

LGTM

@disksing disksing merged commit e94477a into master Nov 24, 2016
@disksing disksing deleted the disksing/fix-gc-bug branch November 24, 2016 09:37
iosmanthus pushed a commit to iosmanthus/tikv that referenced this pull request May 31, 2024
Signed-off-by: Ping Yu <yuping@pingcap.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.

4 participants