github-actions[bot] commented on code in PR #65902:
URL: https://github.com/apache/doris/pull/65902#discussion_r3629980956


##########
regression-test/suites/partition_p0/auto_partition/test_auto_dynamic.groovy:
##########
@@ -116,31 +116,38 @@ suite("test_auto_dynamic", "nonConcurrent") {
     part_result = sql " show partitions from auto_dynamic "
     assertEquals(part_result.size(), 1)
 
-    def skip_test = false
+    sql """ admin set frontend config 
('dynamic_partition_check_interval_seconds' = '600') """
+    // The interval is global, so a preceding short-interval scheduler cycle 
may still be in flight.
+    sleep(8000)
+
+    def insertException = null
     test {
         sql " insert into auto_dynamic values ('2024-01-01'), ('2900-01-01'), 
('1900-01-01'), ('3000-01-01'); "
         check { result, exception, startTime, endTime ->
-            if (exception != null) {
-                // the partition of 1900-01-01 directly been recovered before 
the insert txn finished. let it success
-                part_result = sql " show partitions from auto_dynamic "
-                log.info("${part_result}".toString())
-                assertTrue(exception.getMessage().contains("get partition 
p19000101000000 failed"))
-                skip_test = true
-            }
+            insertException = exception
         }
     }
-    if (skip_test) {
+    if (insertException != null) {
+        part_result = sql " show partitions from auto_dynamic "
+        def partitionNames = part_result.collect { it[1] }
+        def expectedSurvivingPartitions = ["p20240101000000", 
"p29000101000000", "p30000101000000"]
+        // A stale short-interval run can only delete the out-of-range p1900 
partition before commit.
+        assertTrue(!partitionNames.contains("p19000101000000")

Review Comment:
   The partition snapshot is not enough to identify the intended race because 
this branch never inspects `insertException`. Automatic partition creation 
persists the requested partitions before later tablet-metadata, BE writer, and 
transaction stages, any of which can fail independently; aborting the INSERT 
does not remove those catalog partitions. If the scheduler also removes 
`p1900`, an unrelated later failure leaves this predicate true and the suite 
returns success, masking the regression. Please also classify the captured 
exception/root cause as the missing-`p1900` failure (and fail every other 
exception), using this partition state only as the additional race-state check.



##########
regression-test/suites/partition_p0/auto_partition/test_auto_dynamic.groovy:
##########
@@ -116,31 +116,38 @@ suite("test_auto_dynamic", "nonConcurrent") {
     part_result = sql " show partitions from auto_dynamic "
     assertEquals(part_result.size(), 1)
 
-    def skip_test = false
+    sql """ admin set frontend config 
('dynamic_partition_check_interval_seconds' = '600') """
+    // The interval is global, so a preceding short-interval scheduler cycle 
may still be in flight.
+    sleep(8000)

Review Comment:
   `sleep(8000)` cannot drain an already-running scheduler cycle. Updating this 
config only changes the daemon's next interval; it does not interrupt or join 
the synchronous cycle that is scanning the global registered-table set, and 
that cycle has no duration bound. If it is still processing an earlier table 
here, the later change to one second does not launch another cycle, so 
`auto_dynamic` may not be cleaned until after the following ten-second wait. 
The successful INSERT path then still sees `p1900` and fails its count or query 
assertion. Please wait/poll on an observable scheduler/table state with a 
bounded diagnostic timeout instead of treating elapsed time as a completion 
barrier.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to