This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 9b2d3c242bf [fix](cloud-merge) Fix the unsteadiness cases about ttl
(#33723)
9b2d3c242bf is described below
commit 9b2d3c242bfd120a2af0e1d638ad3e6f61d72b47
Author: Lightman <[email protected]>
AuthorDate: Wed Apr 17 14:28:45 2024 +0800
[fix](cloud-merge) Fix the unsteadiness cases about ttl (#33723)
---
.../suites/cloud_p0/cache/ttl/alter_ttl_1.groovy | 1 +
.../suites/cloud_p0/cache/ttl/alter_ttl_2.groovy | 21 +++++++++++++++++++++
.../suites/cloud_p0/cache/ttl/alter_ttl_4.groovy | 13 +++++++------
.../suites/cloud_p0/cache/ttl/test_ttl.groovy | 16 +++-------------
4 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_1.groovy
b/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_1.groovy
index 886529c2a30..86c6aef4d6f 100644
--- a/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_1.groovy
+++ b/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_1.groovy
@@ -97,6 +97,7 @@ suite("alter_ttl_1") {
}
load_customer_ttl_once("customer_ttl")
+ sql """ select count(*) from customer_ttl """
sleep(30000)
long ttl_cache_size = 0
getMetricsMethod.call() {
diff --git a/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_2.groovy
b/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_2.groovy
index b7140087c04..d4b2a25cf4c 100644
--- a/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_2.groovy
+++ b/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_2.groovy
@@ -95,8 +95,29 @@ suite("alter_ttl_2") {
clearFileCache.call() {
respCode, body -> {}
}
+ sleep(30000)
+ getMetricsMethod.call() {
+ respCode, body ->
+ assertEquals("${respCode}".toString(), "200")
+ String out = "${body}".toString()
+ def strs = out.split('\n')
+ Boolean flag1 = false;
+ for (String line in strs) {
+ if (flag1) break;
+ if (line.contains("ttl_cache_size")) {
+ if (line.startsWith("#")) {
+ continue
+ }
+ def i = line.indexOf(' ')
+ assertEquals(line.substring(i).toLong(), 0)
+ flag1 = true
+ }
+ }
+ assertTrue(flag1)
+ }
load_customer_ttl_once("customer_ttl")
+ sql """ select count(*) from customer_ttl """
sleep(30000)
long ttl_cache_size = 0
getMetricsMethod.call() {
diff --git a/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_4.groovy
b/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_4.groovy
index 398ca843243..8fef1da2016 100644
--- a/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_4.groovy
+++ b/regression-test/suites/cloud_p0/cache/ttl/alter_ttl_4.groovy
@@ -19,7 +19,7 @@ import org.codehaus.groovy.runtime.IOGroovyMethods
suite("alter_ttl_4") {
sql """ use @regression_cluster_name1 """
- def ttlProperties = """ PROPERTIES("file_cache_ttl_seconds"="0") """
+ def ttlProperties = """ PROPERTIES("file_cache_ttl_seconds"="90") """
String[][] backends = sql """ show backends """
String backendId;
def backendIdToBackendIP = [:]
@@ -132,7 +132,7 @@ suite("alter_ttl_4") {
def strs = out.split('\n')
Boolean flag2 = false;
for (String line in strs) {
- if (line.contains("file_cache_cache_size")) {
+ if (line.contains("ttl_cache_size")) {
if (line.startsWith("#")) {
continue
}
@@ -143,7 +143,7 @@ suite("alter_ttl_4") {
}
assertTrue(flag2)
}
-
+ sleep(60000)
// one customer table would take about 1.3GB, the total cache size is 20GB
// the following would take 20.8G all
// evict customer_ttl
@@ -164,9 +164,6 @@ suite("alter_ttl_4") {
load_customer_once("customer")
load_customer_once("customer")
- sql """ ALTER TABLE customer_ttl SET ("file_cache_ttl_seconds"="3600") """
- // wait for fetching new tablet meta in BE
- sleep(60000)
// some datas in s3 and will download them
sql """ select C_CUSTKEY from customer_ttl order by C_CUSTKEY limit 1"""
sql """ select C_NAME from customer_ttl order by C_NAME limit 1"""
@@ -176,6 +173,10 @@ suite("alter_ttl_4") {
sql """ select C_ACCTBAL from customer_ttl order by C_ACCTBAL limit 1"""
sql """ select C_MKTSEGMENT from customer_ttl order by C_MKTSEGMENT limit
1"""
sql """ select C_COMMENT from customer_ttl order by C_COMMENT limit 1"""
+
+ sql """ ALTER TABLE customer_ttl SET ("file_cache_ttl_seconds"="3600") """
+ // wait for fetching new tablet meta in BE
+ sleep(60000)
// wait for updating file cache metrics
sleep(30000)
getMetricsMethod.call() {
diff --git a/regression-test/suites/cloud_p0/cache/ttl/test_ttl.groovy
b/regression-test/suites/cloud_p0/cache/ttl/test_ttl.groovy
index e5b796f45a7..ce865ede675 100644
--- a/regression-test/suites/cloud_p0/cache/ttl/test_ttl.groovy
+++ b/regression-test/suites/cloud_p0/cache/ttl/test_ttl.groovy
@@ -97,17 +97,15 @@ suite("test_ttl") {
load_customer_once("customer_ttl")
sleep(30000) // 30s
- long total_cache_size = 0
getMetricsMethod.call() {
respCode, body ->
assertEquals("${respCode}".toString(), "200")
String out = "${body}".toString()
def strs = out.split('\n')
Boolean flag1 = false;
- Boolean flag2 = false;
long ttl_cache_size = 0;
for (String line in strs) {
- if (flag1 && flag2) break;
+ if (flag1) break;
if (line.contains("ttl_cache_size")) {
if (line.startsWith("#")) {
continue
@@ -116,17 +114,9 @@ suite("test_ttl") {
ttl_cache_size = line.substring(i).toLong()
flag1 = true
}
- if (line.contains("file_cache_cache_size")) {
- if (line.startsWith("#")) {
- continue
- }
- def i = line.indexOf(' ')
- total_cache_size = line.substring(i).toLong()
- flag2 = true
- }
}
- assertTrue(flag1 && flag2)
- assertEquals(ttl_cache_size, total_cache_size)
+ assertTrue(flag1)
+ assertTrue(ttl_cache_size > 1073741824)
}
sleep(180000)
getMetricsMethod.call() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]