You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Userwhite (via GitHub)" <gi...@apache.org> on 2025/04/02 10:23:39 UTC

[PR] [Bug](Compaction): fix version miss when too many invisible version [doris]

Userwhite opened a new pull request, #49771:
URL: https://github.com/apache/doris/pull/49771

   ### What problem does this PR solve?
   
   when too many invisible version, compact may choose some versions before `visible version`, and choose some versions after `visible_version + keep_invisible_version_limit`, it will lead that check version miss fail
   
   ![image](https://github.com/user-attachments/assets/c4083c0b-6f2d-43ef-9e80-6a5641b0f40c)
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "Userwhite (via GitHub)" <gi...@apache.org>.
Userwhite commented on PR #49771:
URL: https://github.com/apache/doris/pull/49771#issuecomment-3704754373

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #49771:
URL: https://github.com/apache/doris/pull/49771#issuecomment-3704804051

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 173821 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit b4be2d53bb6a36b6f3a4556746ef0583c4b9fad5, data reload: false
   
   query5	4831	601	459	459
   query6	340	233	229	229
   query7	4205	457	277	277
   query8	346	261	269	261
   query9	8769	2623	2655	2623
   query10	546	360	315	315
   query11	15323	15217	14996	14996
   query12	174	114	114	114
   query13	1248	481	397	397
   query14	6166	2998	2760	2760
   query14_1	2676	2704	2638	2638
   query15	210	201	176	176
   query16	1025	487	431	431
   query17	1076	696	599	599
   query18	2562	449	379	379
   query19	216	223	199	199
   query20	122	120	116	116
   query21	218	139	120	120
   query22	4003	4107	3905	3905
   query23	16036	15584	15499	15499
   query23_1	15417	15483	15624	15483
   query24	7473	1586	1208	1208
   query24_1	1267	1217	1237	1217
   query25	532	442	408	408
   query26	1237	262	160	160
   query27	2771	446	298	298
   query28	4550	2197	2183	2183
   query29	756	540	444	444
   query30	313	245	210	210
   query31	768	618	541	541
   query32	76	75	68	68
   query33	546	368	312	312
   query34	880	881	539	539
   query35	742	798	712	712
   query36	859	901	814	814
   query37	128	91	87	87
   query38	2838	2785	2683	2683
   query39	777	753	730	730
   query39_1	704	705	714	705
   query40	229	136	122	122
   query41	72	68	69	68
   query42	115	112	110	110
   query43	462	480	431	431
   query44	1360	786	767	767
   query45	192	189	176	176
   query46	901	1021	642	642
   query47	1335	1483	1314	1314
   query48	322	341	254	254
   query49	635	429	360	360
   query50	658	295	218	218
   query51	3773	3755	3807	3755
   query52	116	114	103	103
   query53	302	333	277	277
   query54	297	276	277	276
   query55	84	80	76	76
   query56	301	312	310	310
   query57	1037	992	980	980
   query58	279	261	264	261
   query59	2172	2081	1998	1998
   query60	339	343	320	320
   query61	194	189	186	186
   query62	407	351	319	319
   query63	313	270	273	270
   query64	5035	1419	1098	1098
   query65	3818	3660	3720	3660
   query66	1411	432	336	336
   query67	14964	15012	14712	14712
   query68	8233	1041	731	731
   query69	508	348	313	313
   query70	1040	901	855	855
   query71	371	299	285	285
   query72	6122	3442	3489	3442
   query73	765	733	316	316
   query74	8809	8804	8570	8570
   query75	2862	2854	2532	2532
   query76	3843	1075	690	690
   query77	529	382	294	294
   query78	9755	9979	9192	9192
   query79	1256	935	628	628
   query80	634	597	502	502
   query81	507	268	236	236
   query82	214	145	112	112
   query83	270	267	247	247
   query84	256	130	107	107
   query85	917	525	465	465
   query86	428	316	316	316
   query87	2881	2889	2791	2791
   query88	3246	2298	2299	2298
   query89	407	341	327	327
   query90	2181	162	148	148
   query91	181	170	145	145
   query92	89	70	65	65
   query93	1118	944	575	575
   query94	580	327	293	293
   query95	574	384	310	310
   query96	607	475	210	210
   query97	2315	2373	2299	2299
   query98	223	203	209	203
   query99	578	591	501	501
   Total cold run time: 255238 ms
   Total hot run time: 173821 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #49771: [Bug](Compaction): fix compact version miss when too many invisible version
URL: https://github.com/apache/doris/pull/49771


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "yujun777 (via GitHub)" <gi...@apache.org>.
yujun777 commented on code in PR #49771:
URL: https://github.com/apache/doris/pull/49771#discussion_r2265855103


##########
be/src/olap/tablet.cpp:
##########
@@ -1296,8 +1296,8 @@ std::vector<RowsetSharedPtr> Tablet::_pick_visible_rowsets_to_compaction(
             // 1. had been visible;
             // 2. exceeds the limit of keep invisible versions.
             int64_t version_end = version.second;
-            if (version_end <= visible_version ||
-                version_end > visible_version + keep_invisible_version_limit) {
+            if (version_end <= visible_version || ((candidate_rowsets.empty() || candidate_rowsets.front()->version().second > visible_version) 

Review Comment:
   suppose max version = 1000,  visible version = 100,   keep_invisible_version_limit = 20,  then all the versions can split into 3 parts:
   A. 1 ~ 100  (1 to visible version);
   B. 101 ~ 120 (visible version  + 1 to visible_version + keep_visible_version_limit);
   C.  121 ~ 1000;
   
   will chose part A,  part C to compact,  but not chose part B to compact (if compact cross visible version,  sql query will throw error E-230 version had been compact ) ;
   
   so we need to compact part A + part C,   but the problem is,  for base compaction, need the candidate rowsets continous (but not require from version 1 ),  so if the candidate rowset is all part A or all part C is ok,  but if include them both will fail.
   
   here is the fix:
   use two candidate_rowset  vectors:
   one is to hold  part A:  version_end <= visible version
   the other is to hold part C:  version_end > visible_version + keep_invisible_version_limit
   
   if vector size of part A >1, then return part A;
   else return part C;



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "Userwhite (via GitHub)" <gi...@apache.org>.
Userwhite commented on PR #49771:
URL: https://github.com/apache/doris/pull/49771#issuecomment-3704754703

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "yujun777 (via GitHub)" <gi...@apache.org>.
yujun777 commented on code in PR #49771:
URL: https://github.com/apache/doris/pull/49771#discussion_r2265883133


##########
be/src/olap/tablet.cpp:
##########
@@ -1296,8 +1296,8 @@ std::vector<RowsetSharedPtr> Tablet::_pick_visible_rowsets_to_compaction(
             // 1. had been visible;
             // 2. exceeds the limit of keep invisible versions.
             int64_t version_end = version.second;
-            if (version_end <= visible_version ||
-                version_end > visible_version + keep_invisible_version_limit) {
+            if (version_end <= visible_version || ((candidate_rowsets.empty() || candidate_rowsets.front()->version().second > visible_version) 

Review Comment:
   there's a docker regression case 'compaction/test_compaction_with_visible_version.groovy', need to pass the docker case, but notice github pr pipeline don't run the docker case,  need run docker case in locale machine.   
   
   how to run a docker suite can see the annotations in case 'demo_p0/docker_action.groovy'



##########
be/src/olap/tablet.cpp:
##########
@@ -1296,8 +1296,8 @@ std::vector<RowsetSharedPtr> Tablet::_pick_visible_rowsets_to_compaction(
             // 1. had been visible;
             // 2. exceeds the limit of keep invisible versions.
             int64_t version_end = version.second;
-            if (version_end <= visible_version ||
-                version_end > visible_version + keep_invisible_version_limit) {
+            if (version_end <= visible_version || ((candidate_rowsets.empty() || candidate_rowsets.front()->version().second > visible_version) 

Review Comment:
   suppose max version = 1000,  visible version = 100,   keep_invisible_version_limit = 20,  then all the versions can split into 3 parts:
   A. 1 ~ 100  (1 to visible version);
   B. 101 ~ 120 (visible version  + 1 to visible_version + keep_visible_version_limit);
   C.  121 ~ 1000;
   
   will chose part A,  part C to compact,  but not chose part B to compact (if compact cross visible version,  sql query will throw error E-230 version had been compact ) ;
   
   so we need to compact part A + part C,   but the problem is,  for compaction, need the candidate rowsets continous (but not require from version 1 ),  so if the candidate rowset is all part A or all part C is ok,  but if include them both will fail.
   
   here is the fix:
   use two candidate_rowset  vectors:
   one is to hold  part A:  version.second >= visible version, 
   the other is to hold part C:  version.first(notice this change to version.first) > visible_version + keep_invisible_version_limit
   
   if vector size of part A exceeds, then return part A;
   else return part C;



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49771:
URL: https://github.com/apache/doris/pull/49771#issuecomment-4861184389

   We're closing this PR because it hasn't been updated in a while.
   This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "yujun777 (via GitHub)" <gi...@apache.org>.
yujun777 commented on code in PR #49771:
URL: https://github.com/apache/doris/pull/49771#discussion_r2265855103


##########
be/src/olap/tablet.cpp:
##########
@@ -1296,8 +1296,8 @@ std::vector<RowsetSharedPtr> Tablet::_pick_visible_rowsets_to_compaction(
             // 1. had been visible;
             // 2. exceeds the limit of keep invisible versions.
             int64_t version_end = version.second;
-            if (version_end <= visible_version ||
-                version_end > visible_version + keep_invisible_version_limit) {
+            if (version_end <= visible_version || ((candidate_rowsets.empty() || candidate_rowsets.front()->version().second > visible_version) 

Review Comment:
   suppose max version = 1000,  visible version = 100,   keep_invisible_version_limit = 20,  then all the versions can split into 3 parts:
   A. 1 ~ 100  (1 to visible version);
   B. 101 ~ 120 (visible version  + 1 to visible_version + keep_visible_version_limit);
   C.  121 ~ 1000;
   
   will chose part A,  part C to compact,  but not chose part B to compact (if compact cross visible version,  sql query will throw error E-230 version had been compact ) ;
   
   so we need to compact part A + part C,   but the problem is,  for base compaction, need the candidate rowsets continous (but not require from version 1 ),  so if the candidate rowset is all part A or all part C is ok,  but if include them both will fail.
   
   here is the fix:
   use two candidate_rowset  vectors:
   one is to hold  part A:  version.second >= visible version, 
   the other is to hold part C:  version.first(notice this change to version.first) > visible_version + keep_invisible_version_limit
   
   if vector size of part A >1, then return part A;
   else return part C;



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "yujun777 (via GitHub)" <gi...@apache.org>.
yujun777 commented on code in PR #49771:
URL: https://github.com/apache/doris/pull/49771#discussion_r2265855103


##########
be/src/olap/tablet.cpp:
##########
@@ -1296,8 +1296,8 @@ std::vector<RowsetSharedPtr> Tablet::_pick_visible_rowsets_to_compaction(
             // 1. had been visible;
             // 2. exceeds the limit of keep invisible versions.
             int64_t version_end = version.second;
-            if (version_end <= visible_version ||
-                version_end > visible_version + keep_invisible_version_limit) {
+            if (version_end <= visible_version || ((candidate_rowsets.empty() || candidate_rowsets.front()->version().second > visible_version) 

Review Comment:
   suppose max version = 1000,  visible version = 100,   keep_invisible_version_limit = 20,  then all the versions can split into 3 parts:
   A. 1 ~ 100  (1 to visible version);
   B. 101 ~ 120 (visible version  + 1 to visible_version + keep_visible_version_limit);
   C.  121 ~ 1000;
   
   will chose part A,  part C to compact,  but not chose part B to compact (if compact cross visible version,  sql query will throw error E-230 version had been compact ) ;
   
   so we need to compact part A + part C,   but the problem is,  for compaction, need the candidate rowsets continous (but not require from version 1 ),  so if the candidate rowset is all part A or all part C is ok,  but if include them both will fail.
   
   here is the fix:
   use two candidate_rowset  vectors:
   one is to hold  part A:  version.second >= visible version, 
   the other is to hold part C:  version.first(notice this change to version.first) > visible_version + keep_invisible_version_limit
   
   if vector size of part A exceeds 1, then return part A;
   else return part C;



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "yujun777 (via GitHub)" <gi...@apache.org>.
yujun777 commented on code in PR #49771:
URL: https://github.com/apache/doris/pull/49771#discussion_r2265855103


##########
be/src/olap/tablet.cpp:
##########
@@ -1296,8 +1296,8 @@ std::vector<RowsetSharedPtr> Tablet::_pick_visible_rowsets_to_compaction(
             // 1. had been visible;
             // 2. exceeds the limit of keep invisible versions.
             int64_t version_end = version.second;
-            if (version_end <= visible_version ||
-                version_end > visible_version + keep_invisible_version_limit) {
+            if (version_end <= visible_version || ((candidate_rowsets.empty() || candidate_rowsets.front()->version().second > visible_version) 

Review Comment:
   suppose max version = 1000,  visible version = 100,   keep_invisible_version_limit = 20,  then all the versions can split into 3 parts:
   A. 1 ~ 100  (1 to visible version);
   B. 101 ~ 120 (visible version  + 1 to visible_version + keep_visible_version_limit);
   C.  121 ~ 1000;
   
   will chose part A,  part C to compact,  but not chose part B to compact (if compact cross visible version,  sql query will throw error E-230 version had been compact ) ;
   
   so we need to compact part A + part C,   but the problem is,  for base compaction, need the candidate rowsets continous (but not require from version 1 ),  so if the candidate rowset is all part A or all part C is ok,  but if include them both will fail.
   
   here is the fix:
   use two candidate_rowset  vectors:
   one is to hold  part A:  version.second >= visible version, 
   the other is to hold part C:  version.first(notice this change to version.first) > visible_version + keep_invisible_version_limit
   
   if vector size of part A exceeds 1, then return part A;
   else return part C;



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #49771:
URL: https://github.com/apache/doris/pull/49771#issuecomment-3704815219

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 27.29 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit b4be2d53bb6a36b6f3a4556746ef0583c4b9fad5, data reload: false
   
   query1	0.06	0.04	0.04
   query2	0.10	0.05	0.04
   query3	0.25	0.09	0.09
   query4	1.61	0.12	0.11
   query5	0.27	0.26	0.25
   query6	1.14	0.69	0.66
   query7	0.02	0.02	0.02
   query8	0.05	0.04	0.05
   query9	0.55	0.50	0.50
   query10	0.54	0.55	0.54
   query11	0.16	0.12	0.11
   query12	0.16	0.14	0.13
   query13	0.62	0.60	0.60
   query14	1.00	0.99	0.99
   query15	0.82	0.79	0.81
   query16	0.40	0.42	0.42
   query17	1.07	0.99	1.08
   query18	0.23	0.22	0.22
   query19	1.99	1.82	1.94
   query20	0.02	0.01	0.02
   query21	15.42	0.28	0.14
   query22	4.81	0.05	0.05
   query23	16.06	0.29	0.11
   query24	0.96	0.62	0.63
   query25	0.13	0.12	0.05
   query26	0.14	0.14	0.13
   query27	0.08	0.05	0.06
   query28	4.71	1.07	0.88
   query29	12.58	3.87	3.16
   query30	0.29	0.13	0.12
   query31	2.82	0.61	0.39
   query32	3.23	0.57	0.47
   query33	2.97	3.02	3.05
   query34	16.59	5.09	4.43
   query35	4.51	4.48	4.48
   query36	0.66	0.51	0.48
   query37	0.11	0.06	0.06
   query38	0.07	0.05	0.03
   query39	0.05	0.03	0.03
   query40	0.17	0.14	0.14
   query41	0.08	0.03	0.04
   query42	0.04	0.03	0.02
   query43	0.05	0.03	0.03
   Total cold run time: 97.59 s
   Total hot run time: 27.29 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "Userwhite (via GitHub)" <gi...@apache.org>.
Userwhite commented on code in PR #49771:
URL: https://github.com/apache/doris/pull/49771#discussion_r2464819665


##########
be/src/olap/tablet.cpp:
##########
@@ -1296,8 +1296,8 @@ std::vector<RowsetSharedPtr> Tablet::_pick_visible_rowsets_to_compaction(
             // 1. had been visible;
             // 2. exceeds the limit of keep invisible versions.
             int64_t version_end = version.second;
-            if (version_end <= visible_version ||
-                version_end > visible_version + keep_invisible_version_limit) {
+            if (version_end <= visible_version || ((candidate_rowsets.empty() || candidate_rowsets.front()->version().second > visible_version) 

Review Comment:
   ok, i'll fix it
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "dataroaring (via GitHub)" <gi...@apache.org>.
dataroaring commented on PR #49771:
URL: https://github.com/apache/doris/pull/49771#issuecomment-3172724157

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix version miss when too many invisible version [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #49771:
URL: https://github.com/apache/doris/pull/49771#issuecomment-2772121059

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).
   
   Please clearly describe your PR:
   1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
   2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
   3. What features were added. Why was this function added?
   4. Which code was refactored and why was this part of the code refactored?
   5. Which functions were optimized and what is the difference before and after the optimization?
       


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Bug](Compaction): fix compact version miss when too many invisible version [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #49771:
URL: https://github.com/apache/doris/pull/49771#issuecomment-3704785344

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 31868 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit b4be2d53bb6a36b6f3a4556746ef0583c4b9fad5, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	17651	4281	4077	4077
   q2	2033	354	242	242
   q3	10148	1295	754	754
   q4	10205	826	317	317
   q5	7514	2121	1905	1905
   q6	193	176	148	148
   q7	943	809	661	661
   q8	9277	1419	1093	1093
   q9	5209	4806	4685	4685
   q10	6828	1812	1437	1437
   q11	511	311	291	291
   q12	707	755	591	591
   q13	17802	3816	3114	3114
   q14	286	304	274	274
   q15	595	518	508	508
   q16	710	672	641	641
   q17	722	706	656	656
   q18	6606	6366	6528	6366
   q19	1193	974	610	610
   q20	412	378	255	255
   q21	3142	2638	2261	2261
   q22	1096	1032	982	982
   Total cold run time: 103783 ms
   Total hot run time: 31868 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	4144	4059	4075	4059
   q2	334	382	326	326
   q3	2112	2608	2251	2251
   q4	1331	1732	1314	1314
   q5	4114	4074	4093	4074
   q6	216	168	132	132
   q7	1877	1788	2073	1788
   q8	2650	2429	2458	2429
   q9	7236	7238	7132	7132
   q10	2480	2799	2290	2290
   q11	640	512	451	451
   q12	699	763	628	628
   q13	3696	4185	3576	3576
   q14	287	317	285	285
   q15	548	502	498	498
   q16	635	700	768	700
   q17	1219	1376	1412	1376
   q18	7874	7859	7827	7827
   q19	936	854	918	854
   q20	1999	2086	1951	1951
   q21	5005	4549	4145	4145
   q22	1119	1052	1005	1005
   Total cold run time: 51151 ms
   Total hot run time: 49091 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org