From 8d2b6e8e2001b4da755b33b98032777955b6c156 Mon Sep 17 00:00:00 2001 From: Xin Liao Date: Sat, 31 Oct 2026 15:48:53 +0800 Subject: [PATCH] [fix](regression) Sync version 3 before DROP in test_clean_tablet_when_drop_force_table (#69846) Related PR: #68449 Problem Summary: `test_clean_tablet_when_drop_force_table` fails intermittently with `File cache directories were not cleaned before timeout`. The leftover cache dirs all belong to the version 3 rowsets. #68449 set `disable_auto_compaction=true` for this case. Before that change, cloud compaction called `sync_rowsets()` and loaded version 3 into the BE tablets as a side effect. Now nothing loads version 3 between the second stream load and `DROP TABLE FORCE`, because the case only queries after the version 2 load. The cloud `drop_tablet_callback` only recycles the file cache of rowsets in `get_snapshot_rowset(true)`, so the version 3 cache stays and the cleanup assertion times out. This PR queries the table after the version 3 load, the same way the case already does after version 2. The query loads version 3 on every BE before DROP. It also asserts the row count (160000) to confirm version 3 is visible. --- .../test_clean_tablet_when_drop_force_table.groovy | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/regression-test/suites/cloud_p0/tablets/test_clean_tablet_when_drop_force_table.groovy b/regression-test/suites/cloud_p0/tablets/test_clean_tablet_when_drop_force_table.groovy index 797a0b2df86..a1ffad52558 100644 --- a/regression-test/suites/cloud_p0/tablets/test_clean_tablet_when_drop_force_table.groovy +++ b/regression-test/suites/cloud_p0/tablets/test_clean_tablet_when_drop_force_table.groovy @@ -282,6 +282,16 @@ suite('test_clean_tablet_when_drop_force_table', 'docker') { } } + // Auto compaction is disabled, so nothing else syncs version 3 into the BE tablets. + // DROP only recycles the file cache of rowsets already loaded on the BE, so query + // here to load version 3 before collecting its cache dirs. + for (int i = 0; i < 5; i++) { + def rows = sql """ + select count(*) from $tableName + """ + assertEquals(160000L, rows[0][0] as long) + } + // before drop table force def beforeGetFromFe = getTabletAndBeHostFromFe(tableName) def beforeGetFromBe = getTabletAndBeHostFromBe(cluster.getAllBackends())