Skip to content

Conversation

@mariadb-DenisProtivensky
  • The Jira issue number for this PR is: MDEV-34124

Description

Sequence replication changes:

  • 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.

To support streaming replication:

  • 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

Release Notes

The documentation should be updated to reflect the best way of configuring and using sequences with Galera.

How can this PR be tested?

MTR tests are fixed/new added.

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

- 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.
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
Copy link
Contributor

@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.

LGTM.

@svoj svoj added the Codership Codership Galera label Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Codership Codership Galera

Development

Successfully merging this pull request may close these issues.

4 participants