mirror of https://github.com/citusdata/citus.git
Add tests for concurrent INSERT and VACUUM behaviour
parent
0f01dc3bb8
commit
dd6a456bed
|
@ -0,0 +1,36 @@
|
||||||
|
Parsed test spec with 2 sessions
|
||||||
|
|
||||||
|
starting permutation: s1-begin s1-insert s2-vacuum-analyze s1-commit
|
||||||
|
create_distributed_table
|
||||||
|
|
||||||
|
|
||||||
|
step s1-begin:
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
step s1-insert:
|
||||||
|
INSERT INTO test_insert_vacuum VALUES(1, 1);
|
||||||
|
|
||||||
|
step s2-vacuum-analyze:
|
||||||
|
VACUUM ANALYZE test_insert_vacuum;
|
||||||
|
|
||||||
|
step s1-commit:
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
|
||||||
|
starting permutation: s1-begin s1-insert s2-vacuum-full s1-commit
|
||||||
|
create_distributed_table
|
||||||
|
|
||||||
|
|
||||||
|
step s1-begin:
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
step s1-insert:
|
||||||
|
INSERT INTO test_insert_vacuum VALUES(1, 1);
|
||||||
|
|
||||||
|
step s2-vacuum-full:
|
||||||
|
VACUUM FULL test_insert_vacuum;
|
||||||
|
<waiting ...>
|
||||||
|
step s1-commit:
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
step s2-vacuum-full: <... completed>
|
|
@ -7,4 +7,6 @@ test: isolation_cluster_management
|
||||||
|
|
||||||
test: isolation_dml_vs_repair isolation_copy_placement_vs_copy_placement
|
test: isolation_dml_vs_repair isolation_copy_placement_vs_copy_placement
|
||||||
test: isolation_concurrent_dml isolation_data_migration
|
test: isolation_concurrent_dml isolation_data_migration
|
||||||
test: isolation_drop_shards isolation_copy_placement_vs_modification
|
test: isolation_drop_shards isolation_copy_placement_vs_modification
|
||||||
|
|
||||||
|
test: isolation_insert_vs_vacuum
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
setup
|
||||||
|
{
|
||||||
|
SET citus.shard_replication_factor TO 1;
|
||||||
|
CREATE TABLE test_insert_vacuum(column1 int, column2 int);
|
||||||
|
SELECT create_distributed_table('test_insert_vacuum', 'column1');
|
||||||
|
}
|
||||||
|
|
||||||
|
teardown
|
||||||
|
{
|
||||||
|
DROP TABLE test_insert_vacuum;
|
||||||
|
}
|
||||||
|
|
||||||
|
session "s1"
|
||||||
|
|
||||||
|
step "s1-begin"
|
||||||
|
{
|
||||||
|
BEGIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
step "s1-insert"
|
||||||
|
{
|
||||||
|
INSERT INTO test_insert_vacuum VALUES(1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
step "s1-commit"
|
||||||
|
{
|
||||||
|
COMMIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
session "s2"
|
||||||
|
|
||||||
|
step "s2-vacuum-analyze"
|
||||||
|
{
|
||||||
|
VACUUM ANALYZE test_insert_vacuum;
|
||||||
|
}
|
||||||
|
|
||||||
|
step "s2-vacuum-full"
|
||||||
|
{
|
||||||
|
VACUUM FULL test_insert_vacuum;
|
||||||
|
}
|
||||||
|
|
||||||
|
# INSERT and VACUUM ANALYZE should not block each other.
|
||||||
|
permutation "s1-begin" "s1-insert" "s2-vacuum-analyze" "s1-commit"
|
||||||
|
|
||||||
|
# INSERT and VACUUM FULL should block each other.
|
||||||
|
permutation "s1-begin" "s1-insert" "s2-vacuum-full" "s1-commit"
|
||||||
|
|
Loading…
Reference in New Issue