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


##########
fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/ExplainTableStreamPlanTest.java:
##########
@@ -136,6 +143,21 @@ public void runBeforeAll() throws Exception {
         createTable(createIncrementalStream);
         bumpPartitionsAndReplicas(baseTable, 2002L);
 
+        // A stream with a partition that has no consumption baseline: p2 is 
still empty when the stream is
+        // created, so it is recorded with the sentinel offset, and only gets 
data afterwards. p1 has data
+        // before and after, so it has a real offset and data after it.
+        createTable("create table test_stream.tbl_stream_unconsumed (k1 int, 
k2 int not null) unique key(k1)\n"
+                + "partition by range(k1) (partition p1 values less than 
(\"100\"),"
+                + " partition p2 values less than (\"200\"))\n"
+                + "distributed by hash(k1) buckets 1 
properties(\"replication_num\"=\"1\","
+                + 
"\"enable_unique_key_merge_on_write\"=\"true\",\"changelog.enable\"=\"true\","
+                + 
"\"changelog.ttl_seconds\"=\"9223372036854775807\",\"changelog.need_historical_value\"=\"true\")");
+        OlapTable unconsumedBaseTable = (OlapTable) 
db.getTableOrMetaException("tbl_stream_unconsumed");
+        bumpPartitionAndReplicas(unconsumedBaseTable.getPartition("p1"), 
1001L);
+        createTable("create stream if not exists test_stream.s_unconsumed on 
table test_stream.tbl_stream_unconsumed"
+                + " properties('show_initial_rows' = 'false')");
+        bumpPartitionsAndReplicas(unconsumedBaseTable, 2002L);

Review Comment:
   [P2] Give the new fixture distinct commit TSOs
   
   Both `p1` bumps use `System.currentTimeMillis()`. If those samples fall in 
the same clock millisecond, `s_unconsumed` records the same offset as the 
subsequent bump. `OlapTableStream.hasData()` compares those TSOs rather than 
visible versions, so `p1` is omitted from the changelog plan and both new tests 
fail despite the version advancing from 1001 to 2002. Stream creation does not 
guarantee a new clock tick. Give this fixture explicit increasing positive 
TSOs, or advance its TSO beyond the previous value, so the tests do not depend 
on setup latency.



-- 
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