-
Notifications
You must be signed in to change notification settings - Fork 105
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
Vacuum dropped columns during checkpoint #4074
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andyfengHKU
approved these changes
Aug 13, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4074 +/- ##
==========================================
+ Coverage 84.52% 84.53% +0.01%
==========================================
Files 1300 1300
Lines 51024 51048 +24
Branches 7051 7058 +7
==========================================
+ Hits 43127 43153 +26
+ Misses 7758 7755 -3
- Partials 139 140 +1 ☔ View full report in Codecov by Sentry. |
ray6080
force-pushed
the
fix-drop-column-checkpoint
branch
from
August 14, 2024 00:11
399fef3
to
93840bb
Compare
Benchmark ResultMaster commit hash:
|
ray6080
added a commit
that referenced
this pull request
Aug 14, 2024
ted-wq-x
pushed a commit
to ted-wq-x/kuzu
that referenced
this pull request
Nov 14, 2024
(cherry picked from commit a8e50b2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The PR is to fix a bug due to not vacuum dropped columns during checkpoint. The bug happens when we recover after dropped a column and performed checkpoint. During the recovery, we will have some columns as nullptr, which lead to seg faults when we collect data types from table columns.
This PR solves the issue by always vacuuming dropped columns from storage during checkpoint. Note that the column ID inside property will be reset due to the vacuuming, that's why the checkpoint of catalog now happens after the checkpoint of tables. Letting storage modifies catalog may not be a good practice, alternatively, we can let
TableCatalogEntry
reset its column ids during checkpoint independently, which sounds like a better idea to me.In the future, we should also reclaim disk pages of persistent column chunks being dropped during checkpoint.
A minor refactoring:
nextColumnID
starts from 1 to skip the anonymous NBR_ID column insideRelTableCatalogEntry
). thus removed the special implementation ofRelTableCatalogEntry::getColumnID
.