Merge pull request #5511 from citusdata/fix_metadata_sync_fails_on_follower_schedule

Fix metadata sync fails on multi_follower_schedule
pull/5517/head
Halil Ozan Akgül 2021-12-08 13:18:33 +03:00 committed by GitHub
commit 9471735764
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -8,6 +8,7 @@ SET citus.shard_count TO 4;
SET citus.shard_replication_factor TO 1; SET citus.shard_replication_factor TO 1;
SET citus.next_shard_id TO 93630500; SET citus.next_shard_id TO 93630500;
SELECT 1 FROM master_add_node('localhost', :master_port, groupid => 0); SELECT 1 FROM master_add_node('localhost', :master_port, groupid => 0);
NOTICE: localhost:xxxxx is the coordinator and already contains metadata, skipping syncing the metadata
?column? ?column?
--------------------------------------------------------------------- ---------------------------------------------------------------------
1 1

View File

@ -16,6 +16,7 @@ SELECT create_distributed_table('the_table', 'a');
(1 row) (1 row)
SELECT 1 FROM master_add_node('localhost', :master_port, groupid => 0); SELECT 1 FROM master_add_node('localhost', :master_port, groupid => 0);
NOTICE: localhost:xxxxx is the coordinator and already contains metadata, skipping syncing the metadata
?column? ?column?
--------------------------------------------------------------------- ---------------------------------------------------------------------
1 1
@ -281,11 +282,14 @@ DELETE FROM the_table;
ERROR: cannot assign TransactionIds during recovery ERROR: cannot assign TransactionIds during recovery
-- DDL is not possible -- DDL is not possible
TRUNCATE the_table; TRUNCATE the_table;
ERROR: cannot execute TRUNCATE TABLE in a read-only transaction ERROR: cannot acquire lock mode AccessExclusiveLock on database objects while recovery is in progress
HINT: Only RowExclusiveLock or less can be acquired on database objects during recovery.
TRUNCATE reference_table; TRUNCATE reference_table;
ERROR: cannot execute TRUNCATE TABLE in a read-only transaction ERROR: cannot acquire lock mode AccessExclusiveLock on database objects while recovery is in progress
HINT: Only RowExclusiveLock or less can be acquired on database objects during recovery.
TRUNCATE citus_local_table; TRUNCATE citus_local_table;
ERROR: cannot execute TRUNCATE TABLE in a read-only transaction ERROR: cannot acquire lock mode AccessExclusiveLock on database objects while recovery is in progress
HINT: Only RowExclusiveLock or less can be acquired on database objects during recovery.
ALTER TABLE the_table ADD COLUMN c int; ALTER TABLE the_table ADD COLUMN c int;
ERROR: cannot acquire lock mode AccessExclusiveLock on database objects while recovery is in progress ERROR: cannot acquire lock mode AccessExclusiveLock on database objects while recovery is in progress
HINT: Only RowExclusiveLock or less can be acquired on database objects during recovery. HINT: Only RowExclusiveLock or less can be acquired on database objects during recovery.

View File

@ -1,4 +1,3 @@
test: turn_mx_off
test: multi_follower_sanity_check test: multi_follower_sanity_check
test: follower_single_node test: follower_single_node
test: multi_follower_select_statements test: multi_follower_select_statements
@ -7,3 +6,4 @@ test: multi_follower_configure_followers
# test that no tests leaked intermediate results. This should always be last # test that no tests leaked intermediate results. This should always be last
test: ensure_no_intermediate_data_leak test: ensure_no_intermediate_data_leak
test: check_mx