-
Notifications
You must be signed in to change notification settings - Fork 998
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
[core] Data files with delete records should not be upgraded directly to max level #2962
Conversation
// Why don't we keep addRowCount and deleteRowCount? | ||
// Because in previous versions of DataFileMeta, we only keep rowCount. | ||
// We have to keep the compatibility. | ||
private final long totalRowCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we still use rowCount
naming?
Because in schema, it is still _ROW_COUNT
...
// Because in previous versions of DataFileMeta, we only keep rowCount. | ||
// We have to keep the compatibility. | ||
private final long totalRowCount; | ||
private final @Nullable Long addRowCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to introduce deleteRowCount
?
06ccb22
to
53f7067
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please manually test that the newly written table can be read by the old code.
private final long rowCount; | ||
private final @Nullable Long deleteRowCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this field to last class member.
I've tested by hand, that the old reader code can read this newly written table. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
When i use 0.5 code to read a table written by 0.8-SNAPSHOT, i got this exception. Is that as expected? @tsreaper
|
Purpose
Data files on max level should not have delete records. However when upgrading files to max level we currently does not perform this check.
Tests
TableWriteTest#testUpgradeToMaxLevel
.API and Format
Yes.
DataFileMeta
is changed, and thusManifestEntry
is changed. However as long as we can passPrimaryKeyFileStoreTableTest#testStreamingChangelogCompatibility02
there should not be any issue.Documentation
No.