[bugfix](disk balance) fix new rowset time check when add tablet (#16261)
In disk balancer, if a tablet is in highly concurrent load, new rowset creation time(which use current time) may be same as the newest rowset, and when add tablet, there has a creation time check that new_time must bigger than old time, so disk balancer will failed many times and makes this tablet lose many verisons as migration will block writes.
This commit is contained in:
@ -157,7 +157,7 @@ Status TabletManager::_add_tablet_unlocked(TTabletId tablet_id, const TabletShar
|
||||
// here, the new rowset's file will also be dropped, so use keep files here
|
||||
bool keep_files = force ? true : false;
|
||||
if (force ||
|
||||
(new_version > old_version || (new_version == old_version && new_time > old_time))) {
|
||||
(new_version > old_version || (new_version == old_version && new_time >= old_time))) {
|
||||
// check if new tablet's meta is in store and add new tablet's meta to meta store
|
||||
res = _add_tablet_to_map_unlocked(tablet_id, tablet, update_meta, keep_files,
|
||||
true /*drop_old*/);
|
||||
|
||||
Reference in New Issue
Block a user