mirror of https://github.com/citusdata/citus.git
Add recovery vs. recovery isolation test
parent
ae47df01ea
commit
fe798cf0f9
|
@ -98,7 +98,7 @@ step s1-get-current-transaction-id:
|
||||||
|
|
||||||
row
|
row
|
||||||
|
|
||||||
(0,287)
|
(0,289)
|
||||||
step s2-get-first-worker-active-transactions:
|
step s2-get-first-worker-active-transactions:
|
||||||
SELECT * FROM run_command_on_workers('SELECT row(initiator_node_identifier, transaction_number)
|
SELECT * FROM run_command_on_workers('SELECT row(initiator_node_identifier, transaction_number)
|
||||||
FROM
|
FROM
|
||||||
|
@ -109,4 +109,4 @@ step s2-get-first-worker-active-transactions:
|
||||||
|
|
||||||
nodename nodeport success result
|
nodename nodeport success result
|
||||||
|
|
||||||
localhost 57637 t (0,287)
|
localhost 57637 t (0,289)
|
||||||
|
|
|
@ -29,11 +29,11 @@ step detector-dump-wait-edges:
|
||||||
|
|
||||||
waiting_transaction_numblocking_transaction_numblocking_transaction_waiting
|
waiting_transaction_numblocking_transaction_numblocking_transaction_waiting
|
||||||
|
|
||||||
290 289 f
|
292 291 f
|
||||||
transactionnumberwaitingtransactionnumbers
|
transactionnumberwaitingtransactionnumbers
|
||||||
|
|
||||||
289
|
291
|
||||||
290 289
|
292 291
|
||||||
step s1-abort:
|
step s1-abort:
|
||||||
ABORT;
|
ABORT;
|
||||||
|
|
||||||
|
@ -77,14 +77,14 @@ step detector-dump-wait-edges:
|
||||||
|
|
||||||
waiting_transaction_numblocking_transaction_numblocking_transaction_waiting
|
waiting_transaction_numblocking_transaction_numblocking_transaction_waiting
|
||||||
|
|
||||||
294 293 f
|
296 295 f
|
||||||
295 293 f
|
297 295 f
|
||||||
295 294 t
|
297 296 t
|
||||||
transactionnumberwaitingtransactionnumbers
|
transactionnumberwaitingtransactionnumbers
|
||||||
|
|
||||||
293
|
295
|
||||||
294 293
|
296 295
|
||||||
295 293,294
|
297 295,296
|
||||||
step s1-abort:
|
step s1-abort:
|
||||||
ABORT;
|
ABORT;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ step s1-finish:
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
step s2-insert: <... completed>
|
step s2-insert: <... completed>
|
||||||
error in steps s1-finish s2-insert: ERROR: duplicate key value violates unique constraint "test_locking_a_key_102320"
|
error in steps s1-finish s2-insert: ERROR: duplicate key value violates unique constraint "test_locking_a_key_102321"
|
||||||
step s2-finish:
|
step s2-finish:
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
|
|
|
@ -19,3 +19,27 @@ step s2-insert:
|
||||||
step s1-commit:
|
step s1-commit:
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
|
|
||||||
|
starting permutation: s1-begin s1-recover s2-recover s1-commit
|
||||||
|
create_reference_table
|
||||||
|
|
||||||
|
|
||||||
|
step s1-begin:
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
step s1-recover:
|
||||||
|
SELECT recover_prepared_transactions();
|
||||||
|
|
||||||
|
recover_prepared_transactions
|
||||||
|
|
||||||
|
0
|
||||||
|
step s2-recover:
|
||||||
|
SELECT recover_prepared_transactions();
|
||||||
|
<waiting ...>
|
||||||
|
step s1-commit:
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
step s2-recover: <... completed>
|
||||||
|
recover_prepared_transactions
|
||||||
|
|
||||||
|
0
|
||||||
|
|
|
@ -33,5 +33,13 @@ step "s2-insert"
|
||||||
INSERT INTO test_transaction_recovery VALUES (1,2);
|
INSERT INTO test_transaction_recovery VALUES (1,2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step "s2-recover"
|
||||||
|
{
|
||||||
|
SELECT recover_prepared_transactions();
|
||||||
|
}
|
||||||
|
|
||||||
# Recovery and 2PCs should not block each other
|
# Recovery and 2PCs should not block each other
|
||||||
permutation "s1-begin" "s1-recover" "s2-insert" "s1-commit"
|
permutation "s1-begin" "s1-recover" "s2-insert" "s1-commit"
|
||||||
|
|
||||||
|
# Recovery should not run concurrently
|
||||||
|
permutation "s1-begin" "s1-recover" "s2-recover" "s1-commit"
|
||||||
|
|
Loading…
Reference in New Issue