This is an automated email from the ASF dual-hosted git repository.
hello-stephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 10de7ac0614 [fix](test) stabilize file cache statistics case (#65666)
10de7ac0614 is described below
commit 10de7ac06145a3f1f0cca0e70f07c4f51dee0365
Author: shuke <[email protected]>
AuthorDate: Thu Jul 16 18:15:08 2026 +0800
[fix](test) stabilize file cache statistics case (#65666)
Related PR: #65261
Problem Summary:
`test_file_cache_statistics` verifies that a repeated Hive Parquet read
reaches
BlockFileCache and increments both `total_hit_counts` and
`total_read_counts`.
PR #65261 made the suite `nonConcurrent`, aggregated counters across
cache
paths, and polled asynchronous metrics. However, the final counter
assertion can
still pass or fail with identical relevant code:
- External Regression 995803: PASS, counters `7503/8945 -> 7504/8946`
- External Regression 996006: muted FAIL, the two-counter condition
timed out
- External Regression 996177: PASS, counters `7506/8947 -> 7507/8948`
`nonConcurrent` only prevents other suites from running concurrently. It
does
not serialize file scan ranges inside one SQL statement. The original
query
scans a six-file partitioned table without partition predicates, uses
automatic
pipeline parallelism, and stops at `LIMIT 1`. Which scan ranges perform
reads
before cancellation therefore depends on scheduling.
Parquet file page cache is also enabled by default. It can serve cached
page
headers and payloads before the underlying file reader reaches
BlockFileCache.
Its admission is selective and uses shared BE cache state. As a result,
the
third query may either touch one BlockFileCache block or be completed
from the
upper page cache, while both behaviors return the correct query result.
This is a test isolation issue: a case that asserts BlockFileCache
counter
deltas must make the read path deterministic and isolate the cache layer
under
test.
This PR:
- explicitly disables SQL cache, Hive SQL cache, and Parquet file page
cache for
this BlockFileCache statistics case;
- sets `parallel_pipeline_task_num=1` to remove internal scan-instance
races;
- adds `nation='cn' and city='beijing'` predicates so the query scans
the
single partition file containing the existing expected row.
The output oracle and all file-cache metric assertions are unchanged.
---
.../external_table_p0/cache/test_file_cache_statistics.groovy | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git
a/regression-test/suites/external_table_p0/cache/test_file_cache_statistics.groovy
b/regression-test/suites/external_table_p0/cache/test_file_cache_statistics.groovy
index ff4354f8dec..08ae0da44c0 100644
---
a/regression-test/suites/external_table_p0/cache/test_file_cache_statistics.groovy
+++
b/regression-test/suites/external_table_p0/cache/test_file_cache_statistics.groovy
@@ -45,6 +45,12 @@ suite("test_file_cache_statistics",
"p0,external,nonConcurrent") {
sql """set enable_file_cache=true"""
sql """set disable_file_cache=false"""
+ // This case validates BlockFileCache counters. Keep upper-layer caches
and scan scheduling
+ // from serving or cancelling the repeated read before it reaches
BlockFileCache.
+ sql """set enable_sql_cache=false"""
+ sql """set enable_hive_sql_cache=false"""
+ sql """set enable_parquet_file_page_cache=false"""
+ sql """set parallel_pipeline_task_num=1"""
// Check backend configuration prerequisites
// Note: This test case assumes a single backend scenario. Testing with
single backend is logically equivalent
@@ -82,8 +88,10 @@ suite("test_file_cache_statistics",
"p0,external,nonConcurrent") {
sql """switch ${catalog_name}"""
+ // Pin the query to one partition file instead of racing all six file scan
ranges under LIMIT 1.
String querySql = """select * from
${catalog_name}.${ex_db_name}.parquet_partition_table
- where l_orderkey=1 and l_partkey=1534 limit 1;"""
+ where nation='cn' and city='beijing'
+ and l_orderkey=1 and l_partkey=1534 limit 1;"""
// load the table into file cache
sql querySql
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]