Skip to content

MDEV_38952 Improve galera_sequences family of tests - #5538

Open
sjaakola wants to merge 1 commit into
10.11from
10.11-MDEV_38952
Open

MDEV_38952 Improve galera_sequences family of tests#5538
sjaakola wants to merge 1 commit into
10.11from
10.11-MDEV_38952

Conversation

@sjaakola

Copy link
Copy Markdown
Contributor

This commit fixes a sporadic failure with the test case 1, where recorded result depends on node 1 applying node 2's replicated sequence update before it resumes its already-open transaction:

  • Node 2 SELECT NEXTVAL(s) writes reserved_until=21 and replicates it.

  • On node 1 that lands in Rows_log_event::update_sequence() Since 21 > next_free_value (9), adjust_values(21) discards node 1's still-cached value 9.

    Nothing enforced that ordering: node 1's INSERTs run inside BEGIN, and sync wait does not happen mid-transaction.

The fix is to use selarate session, node_1_ctrl, to wait until node 1 has applied the update, before node 1 resumes its transaction

This commit fixes a sporadic failure with the test case 1,
where recorded result depends on node 1 applying node 2's replicated
sequence update before it resumes its already-open transaction:

- Node 2 SELECT NEXTVAL(s) writes reserved_until=21 and replicates it.
- On node 1 that lands in Rows_log_event::update_sequence()
  Since 21 > next_free_value (9), adjust_values(21) discards node 1's  still-cached value 9.

  Nothing enforced that ordering: node 1's INSERTs run inside BEGIN, and sync wait does not happen mid-transaction.

The fix is to use selarate session, node_1_ctrl, to wait until node 1 has applied the update, before node 1 resumes its transaction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant