This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new b58b813a743 branch-4.1: [fix](regression) Stabilize rowsets timestamp
filters #65050 (#65954)
b58b813a743 is described below
commit b58b813a7434b5525d28569a883b43ce20336bc6
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Jul 24 11:06:55 2026 +0800
branch-4.1: [fix](regression) Stabilize rowsets timestamp filters #65050
(#65954)
Cherry-picked from #65050
Co-authored-by: Jerry Hu <[email protected]>
---
.../suites/query_p0/system/test_query_sys_rowsets.groovy | 12 +++++++-----
.../query_p0/system/test_query_sys_scan_rowsets.groovy | 7 +++++--
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git
a/regression-test/suites/query_p0/system/test_query_sys_rowsets.groovy
b/regression-test/suites/query_p0/system/test_query_sys_rowsets.groovy
index e37356f98e0..63f0646bd00 100644
--- a/regression-test/suites/query_p0/system/test_query_sys_rowsets.groovy
+++ b/regression-test/suites/query_p0/system/test_query_sys_rowsets.groovy
@@ -28,6 +28,11 @@ suite("test_query_sys_rowsets", "query,p0") {
def rowsets_table_name = """ test_query_sys_rowsets.test_query_rowset """
sql """ drop table if exists ${rowsets_table_name} """
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
+ // Use a lower bound before table creation to keep the timestamp filter
stable
+ // across second-level boundary races.
+ def rowsetFilterStartTime = sdf.format(new Date(System.currentTimeMillis()
- 60000L)).toString();
+
sql """
create table ${rowsets_table_name}(
a int ,
@@ -39,9 +44,6 @@ suite("test_query_sys_rowsets", "query,p0") {
"disable_auto_compaction" = "true"
);
"""
-
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
- def now = sdf.format(new Date()).toString();
List<List<Object>> rowsets_table_name_tablets = sql """ show tablets
from ${rowsets_table_name} """
order_qt_rowsets1 """ select START_VERSION,END_VERSION from
information_schema.rowsets where TABLET_ID=${rowsets_table_name_tablets[0][0]}
group by START_VERSION,END_VERSION order by START_VERSION,END_VERSION; """
@@ -51,5 +53,5 @@ suite("test_query_sys_rowsets", "query,p0") {
sql """ insert into ${rowsets_table_name} values (3,0,"dssadasdsafafdf");
"""
order_qt_rowsets3 """ select START_VERSION,END_VERSION from
information_schema.rowsets where TABLET_ID=${rowsets_table_name_tablets[0][0]}
group by START_VERSION,END_VERSION order by START_VERSION,END_VERSION; """
sql """ insert into ${rowsets_table_name} values (4,0,"abcd"); """
- order_qt_rowsets4 """ select START_VERSION,END_VERSION from
information_schema.rowsets where TABLET_ID=${rowsets_table_name_tablets[0][0]}
and NEWEST_WRITE_TIMESTAMP>='${now}' group by START_VERSION,END_VERSION order
by START_VERSION,END_VERSION; """
-}
\ No newline at end of file
+ order_qt_rowsets4 """ select START_VERSION,END_VERSION from
information_schema.rowsets where TABLET_ID=${rowsets_table_name_tablets[0][0]}
and NEWEST_WRITE_TIMESTAMP>='${rowsetFilterStartTime}' group by
START_VERSION,END_VERSION order by START_VERSION,END_VERSION; """
+}
diff --git
a/regression-test/suites/query_p0/system/test_query_sys_scan_rowsets.groovy
b/regression-test/suites/query_p0/system/test_query_sys_scan_rowsets.groovy
index 181ccd89452..25fc1bb7529 100644
--- a/regression-test/suites/query_p0/system/test_query_sys_scan_rowsets.groovy
+++ b/regression-test/suites/query_p0/system/test_query_sys_scan_rowsets.groovy
@@ -47,7 +47,10 @@ suite("test_query_sys_scan_rowsets", "query,p0") {
"""
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
- def now = sdf.format(new Date()).toString();
+ // Keep the timestamp filter after the create-table rowset's second-level
+ // timestamp so rowsets4 consistently excludes version 0-1.
+ Thread.sleep(1100L)
+ def rowsetFilterStartTime = sdf.format(new Date()).toString();
def rowsets_table_name_tablets = sql_return_maparray """ show tablets from
${rowsets_table_name}; """
def tablet_id = rowsets_table_name_tablets[0].TabletId
@@ -66,5 +69,5 @@ suite("test_query_sys_scan_rowsets", "query,p0") {
sql """ insert into ${rowsets_table_name} values (4,0,"abcd"); """
sql """ select * from ${rowsets_table_name}; """
- order_qt_rowsets4 """ select START_VERSION,END_VERSION from
information_schema.rowsets where TABLET_ID=${tablet_id} and
NEWEST_WRITE_TIMESTAMP>='${now}' group by START_VERSION,END_VERSION order by
START_VERSION,END_VERSION; """
+ order_qt_rowsets4 """ select START_VERSION,END_VERSION from
information_schema.rowsets where TABLET_ID=${tablet_id} and
NEWEST_WRITE_TIMESTAMP>='${rowsetFilterStartTime}' group by
START_VERSION,END_VERSION order by START_VERSION,END_VERSION; """
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]