Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS-4744 : crash after alter table drop index is executed on slave #2701

Merged
merged 1 commit into from
Nov 21, 2018

Conversation

george-lorch
Copy link
Contributor

  • Under a specific situation on a slave, when binlog is off and
    log_slave_updates=0, rocksdb_prepare gets called after an
    external_lock(F_UNLCK) is called.
    During the F_UNLCK processing, the current Rdb_transaction is committed and
    cleared, leaving nothing to do or work with in the rocksdb_prepare call.

  • This change solves the issue by implementing the same behavior that TokuDB has.
    That is to check if there is an active transaction at the top of the prepare
    call and exit immediately with HA_EXIT_SUCCESS if there nothing to prepare.
    This prevents falling into code that assumes that there is an active
    transaction and tries to interact with the (missing) transaction instance.

  • Added new test that would segfault the slave when configured correctly and
    the slave applier exectues a specific ALTER TABLE.

- Under a specific situation on a slave, when binlog is off and
  log_slave_updates=0, rocksdb_prepare gets called after an
  external_lock(F_UNLCK) is called.
  During the F_UNLCK processing, the current Rdb_transaction is committed and
  cleared, leaving nothing to do or work with in the rocksdb_prepare call.

- This change solves the issue by implementing the same behavior that TokuDB has.
  That is to check if there is an active transaction at the top of the prepare
  call and exit immediately with HA_EXIT_SUCCESS if there nothing to prepare.
  This prevents falling into code that assumes that there is an active
  transaction and tries to interact with the (missing) transaction instance.

- Added new test that would segfault the slave when configured correctly and
  the slave applier exectues a specific ALTER TABLE.
@george-lorch
Copy link
Contributor Author

@george-lorch george-lorch merged commit a07348c into percona:5.7 Nov 21, 2018
@george-lorch george-lorch deleted the ps-5.7-4744 branch November 21, 2018 15:05
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.

2 participants