mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-24 15:05:03 +08:00
Improve the concurrent refresh test
This change moves the invalidation threshold in the setup phase of the concurrent refresh test for continuous aggregates in order to generate invalidations. Without any invalidations, the invalidation logs are never really processed and thus not subjected to concurrency.
This commit is contained in:
parent
e9cf0add49
commit
a48a4646b0
@ -17,13 +17,16 @@ step S1_select:
|
||||
|
||||
bucket avg_temp
|
||||
|
||||
0 15.8888888888889
|
||||
10 14.2
|
||||
20 13.4
|
||||
30 18.3
|
||||
40 15.1
|
||||
40 16.0909090909091
|
||||
50 26.9
|
||||
60 18.9
|
||||
cagg_bucket_count
|
||||
|
||||
4
|
||||
7
|
||||
hypertable threshold
|
||||
|
||||
conditions 70
|
||||
@ -43,8 +46,11 @@ step S1_select:
|
||||
|
||||
bucket avg_temp
|
||||
|
||||
0 15.8888888888889
|
||||
10 14.2
|
||||
20 13.4
|
||||
30 18.3
|
||||
40 15.1
|
||||
40 16.0909090909091
|
||||
50 26.9
|
||||
60 18.9
|
||||
70 24.6
|
||||
@ -52,7 +58,7 @@ bucket avg_temp
|
||||
90 21.3
|
||||
cagg_bucket_count
|
||||
|
||||
7
|
||||
10
|
||||
hypertable threshold
|
||||
|
||||
conditions 100
|
||||
@ -91,12 +97,15 @@ step S1_select:
|
||||
|
||||
bucket avg_temp
|
||||
|
||||
0 15.8888888888889
|
||||
10 14.2
|
||||
20 13.4
|
||||
70 24.6
|
||||
80 23.6
|
||||
90 21.3
|
||||
cagg_bucket_count
|
||||
|
||||
3
|
||||
6
|
||||
hypertable threshold
|
||||
|
||||
conditions 100
|
||||
@ -135,8 +144,11 @@ step S1_select:
|
||||
|
||||
bucket avg_temp
|
||||
|
||||
0 15.8888888888889
|
||||
10 14.2
|
||||
20 13.4
|
||||
30 18.3
|
||||
40 15.1
|
||||
40 16.0909090909091
|
||||
50 26.9
|
||||
60 18.9
|
||||
70 24.6
|
||||
@ -144,7 +156,7 @@ bucket avg_temp
|
||||
90 21.3
|
||||
cagg_bucket_count
|
||||
|
||||
7
|
||||
10
|
||||
hypertable threshold
|
||||
|
||||
conditions 100
|
||||
@ -183,8 +195,11 @@ step S1_select:
|
||||
|
||||
bucket avg_temp
|
||||
|
||||
0 15.8888888888889
|
||||
10 14.2
|
||||
20 13.4
|
||||
30 18.3
|
||||
40 15.1
|
||||
40 16.0909090909091
|
||||
50 26.9
|
||||
60 18.9
|
||||
70 24.6
|
||||
@ -192,7 +207,7 @@ bucket avg_temp
|
||||
90 21.3
|
||||
cagg_bucket_count
|
||||
|
||||
7
|
||||
10
|
||||
hypertable threshold
|
||||
|
||||
conditions 100
|
||||
@ -230,13 +245,16 @@ step S1_select:
|
||||
|
||||
bucket avg_temp
|
||||
|
||||
0 15.8888888888889
|
||||
10 14.2
|
||||
20 13.4
|
||||
30 18.3
|
||||
40 15.1
|
||||
40 16.0909090909091
|
||||
50 26.9
|
||||
60 18.9
|
||||
cagg_bucket_count
|
||||
|
||||
4
|
||||
7
|
||||
hypertable threshold
|
||||
|
||||
conditions 70
|
||||
@ -278,13 +296,16 @@ step S1_select:
|
||||
|
||||
bucket avg_temp
|
||||
|
||||
0 15.8888888888889
|
||||
10 14.2
|
||||
20 13.4
|
||||
30 18.3
|
||||
40 15.1
|
||||
40 16.0909090909091
|
||||
50 26.9
|
||||
60 18.9
|
||||
cagg_bucket_count
|
||||
|
||||
4
|
||||
7
|
||||
hypertable threshold
|
||||
|
||||
conditions 70
|
||||
@ -326,8 +347,11 @@ step S1_select:
|
||||
|
||||
bucket avg_temp
|
||||
|
||||
0 15.8888888888889
|
||||
10 14.2
|
||||
20 13.4
|
||||
30 18.3
|
||||
40 15.1
|
||||
40 16.0909090909091
|
||||
50 26.9
|
||||
60 18.9
|
||||
70 24.6
|
||||
@ -335,7 +359,7 @@ bucket avg_temp
|
||||
90 21.3
|
||||
cagg_bucket_count
|
||||
|
||||
7
|
||||
10
|
||||
hypertable threshold
|
||||
|
||||
conditions 100
|
||||
@ -376,12 +400,15 @@ step S1_select:
|
||||
|
||||
bucket avg_temp
|
||||
|
||||
0 15.8888888888889
|
||||
10 14.2
|
||||
20 13.4
|
||||
70 24.6
|
||||
80 23.6
|
||||
90 21.3
|
||||
cagg_bucket_count
|
||||
|
||||
3
|
||||
6
|
||||
hypertable threshold
|
||||
|
||||
conditions 100
|
||||
|
@ -85,6 +85,36 @@ setup
|
||||
END; $$ LANGUAGE plpgsql;
|
||||
}
|
||||
|
||||
# Move the invalidation threshold so that we can generate some
|
||||
# invalidations. This must be done in its own setup block since
|
||||
# refreshing can't be done in a transaction block.
|
||||
setup
|
||||
{
|
||||
CALL refresh_continuous_aggregate('cond_10', 0, 30);
|
||||
|
||||
}
|
||||
|
||||
# Generate some invalidations. Must be done in separate transcations
|
||||
# or otherwise there will be only one invalidation.
|
||||
setup
|
||||
{
|
||||
BEGIN;
|
||||
INSERT INTO conditions
|
||||
SELECT t, abs(timestamp_hash(to_timestamp(t)::timestamp))%40
|
||||
FROM generate_series(1, 10, 1) t;
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO conditions
|
||||
SELECT t, abs(timestamp_hash(to_timestamp(t)::timestamp))%40
|
||||
FROM generate_series(10, 20, 1) t;
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO conditions
|
||||
SELECT t, abs(timestamp_hash(to_timestamp(t)::timestamp))%40
|
||||
FROM generate_series(15, 40, 1) t;
|
||||
COMMIT;
|
||||
}
|
||||
|
||||
teardown {
|
||||
DROP TABLE conditions CASCADE;
|
||||
}
|
||||
@ -203,7 +233,6 @@ step "L3_unlock_cagg_table"
|
||||
ROLLBACK;
|
||||
}
|
||||
|
||||
|
||||
# Session to view the contents of a cagg after materialization. It
|
||||
# also prints the bucket count (number of rows in the materialization
|
||||
# hypertable) and the invalidation threshold. The bucket count should
|
||||
|
Loading…
x
Reference in New Issue
Block a user