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

[Bug][Compaction] Fix bug that output rowset is not deleted after compaction failure. #4964

Merged
merged 1 commit into from
Nov 30, 2020

Conversation

morningman
Copy link
Contributor

@morningman morningman commented Nov 26, 2020

Proposed changes

This CL fix 2 bugs:

When the compaction fails, we must explicitly delete the output rowset,
otherwise the GC logic cannot process these rows.

Base compaction failed if compaction process include some delete version in SegmentV2,
Because the number of filtered rows is wrong.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

Checklist

@morningman morningman added kind/fix Categorizes issue or PR as related to a bug. area/compact Issues or PRs related to the compact labels Nov 26, 2020
@morningman morningman self-assigned this Nov 26, 2020
@@ -128,7 +128,7 @@ class Reader {
}

uint64_t filtered_rows() const {
return _stats.rows_del_filtered;
Copy link
Member

@xy720 xy720 Nov 26, 2020

Choose a reason for hiding this comment

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

Hi, is it compatible with segment v1?
In alpha_rowset_reader.h, filtered_rows() only calculates rows_del_filtered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is compatible. Because rows_conditions_filtered is only used for SegmentV2, so it should always to 0 in Segment V1.

Copy link
Member

@xy720 xy720 left a comment

Choose a reason for hiding this comment

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

LGTM

yangzhg
yangzhg previously approved these changes Nov 27, 2020
Copy link
Member

@yangzhg yangzhg left a comment

Choose a reason for hiding this comment

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

+1

@yangzhg yangzhg added the approved Indicates a PR has been approved by one committer. label Nov 27, 2020
be/src/olap/compaction.cpp Show resolved Hide resolved
chaoyli
chaoyli previously approved these changes Nov 30, 2020
@morningman morningman dismissed stale reviews from chaoyli and yangzhg via 8ea8fa5 November 30, 2020 06:18
Copy link
Member

@yangzhg yangzhg left a comment

Choose a reason for hiding this comment

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

+1

@morningman morningman merged commit 99404df into apache:master Nov 30, 2020
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. area/compact Issues or PRs related to the compact kind/fix Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug][Compaction] The data files are not deleted after compaction failed.
5 participants