Skip to content

Conversation

@mariadb-DenisProtivensky
  • fix streaming replication offset for binlog stmt cache:
    As the binlog statement cache is only replicated with the last
    fragment, it's safe to pass zero offset instead of the stored
    log position, which is used only for the binlog transaction cache.
  • extend galera_sequences_transaction test with streaming replication
    combinations (it demonstrates the exact results compared to the regular
    Wsrep replication)
  • remove MDEV-28971 test as it's not applicable after fixing the binlog
    statement cache replication with Wsrep

Based on #537

@mariadb-DenisProtivensky mariadb-DenisProtivensky marked this pull request as ready for review October 23, 2025 13:23
- use shared key for sequence update certification
- employ native replication's code to apply changes for sequences
which handles all corner cases properly
- fix the tests to allow more transactions using sequences to be
accepted

That way the sequence is always updated to the maximum value
independent of the order of updates, and shared certification keys
allow to improve acceptance ratio of concurrent transactions that
use sequences. It's reflected in the test changes.
Copy link

@janlindstrom janlindstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SR fix looks good, I would hope more multi-master test cases especially cases where one of the nodes for some reason is killed or otherwise out of cluster.

@mariadb-DenisProtivensky
Copy link
Author

It will not work until https://jira.mariadb.org/browse/MDEV-32823 is fixed. Moreover, now sequence updates are eventually consistent, so even in case of rollback/crash, they will get in sync either when other replicas advance the sequence far enough or the node that went out of sync replicates new sequence update. In any case, it should be safe.

@mariadb-DenisProtivensky
Copy link
Author

Actually, I think adding a test with the crash scenario is possible. I will look into that.

As the binlog statement cache is only replicated with the last
fragment, it's safe to pass zero offset instead of the stored
log position, which is used only for the binlog transaction cache.
- extend galera_sequences_transaction test with streaming replication
combinations (it demonstrates the exact results compared to the regular
Wsrep replication)
- remove MDEV-28971 test as it's not applicable after fixing the binlog
statement cache replication with Wsrep
@mariadb-DenisProtivensky
Copy link
Author

Added sequences crash recovery test to #537. It's used for SR with combinations.

@mariadb-DenisProtivensky
Copy link
Author

Sending upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants