-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Feature] Support pk table migration (#25521) #25522
Conversation
fc2126d
to
5a47004
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.
Head branch was pushed to by a user without write access
5a47004
to
f4ef300
Compare
83e3d2d
to
79c49f6
Compare
db.readLock(); | ||
try { | ||
OlapTable table = (OlapTable) db.getTable(tabletMeta.getTableId()); | ||
if (table.getKeysType() == KeysType.PRIMARY_KEYS) { | ||
// Currently, primary key table doesn't support tablet migration between local disks. | ||
continue; | ||
} | ||
} finally { | ||
db.readUnlock(); | ||
} |
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.
987-996 lines can be removed
@@ -631,7 +631,7 @@ public boolean needSchedule(boolean isLocalBalance) { | |||
} | |||
|
|||
OlapTable olapTable = (OlapTable) this; |
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.
OlapTable olapTable = (OlapTable) this; |
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.
Done
be/src/storage/tablet_manager.cpp
Outdated
@@ -116,7 +117,9 @@ Status TabletManager::_add_tablet_unlocked(const TabletSharedPtr& new_tablet, bo | |||
auto new_version = (new_rowset == nullptr) ? -1 : new_rowset->end_version(); | |||
old_tablet->release_header_lock(); | |||
bool replace_old = (new_version > old_version) || (new_version == old_version && new_time > old_time); | |||
if (replace_old) { | |||
// In case of pk table migration, version and rowset can not be acquired by | |||
// the above api. We may need to force to replace the old tablet in this case by kMoveFilesToTrash mode |
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.
use pk api to check? better to keep version and time check for safety
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.
done
cc07bf4
to
33aa5f9
Compare
498df63
to
0905216
Compare
b92a0c6
to
0fa6284
Compare
eb390b3
to
8df3252
Compare
[FE PR Coverage Check]😍 pass : 63 / 72 (87.50%) file detail
|
8df3252
to
4c2c05b
Compare
[null Incremental Coverage Report]😞 fail : 46 / 72 (63.89%) file detail
|
4196f0a
to
9779913
Compare
8f78ded
to
1170cba
Compare
Signed-off-by: srlch <linzichao@starrocks.com>
1170cba
to
45b9e2d
Compare
SonarCloud Quality Gate failed.
|
[FE Incremental Coverage Report]😍 pass : 63 / 72 (87.50%) file detail
|
[BE Incremental Coverage Report]😞 fail : 88 / 144 (61.11%) file detail
|
Support primary key table disk migration Fixes StarRocks#25521
Support primary key table disk migration
Fixes #25521
What type of PR is this:
Checklist:
Bugfix cherry-pick branch check: