This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 69e99daf30f8e82028998c9e4d20ebb637791433
Author: yixiutt <[email protected]>
AuthorDate: Fri Feb 3 21:49:37 2023 +0800

    [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.
---
 be/src/olap/tablet_manager.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/olap/tablet_manager.cpp b/be/src/olap/tablet_manager.cpp
index 23c3e7c72c..9d111dd697 100644
--- a/be/src/olap/tablet_manager.cpp
+++ b/be/src/olap/tablet_manager.cpp
@@ -156,7 +156,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*/);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to