summaryrefslogtreecommitdiff
path: root/wsrep-lib
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-30419 Fix unhandled exception thrown from wsrep-libTeemu Ollakka2023-01-191-0/+0
| | | | | | | | | | | | Updated wsrep-lib to version in which server_state wait_until_state() and sst_received() were changed to report errors via return codes instead of throwing exceptions. Added error handling accordingly. Tested manually that failure in sst_received() which was caused by server misconfiguration (unknown configuration variable in server configuration) does not cause crash due to uncaught exception.
* Update wsrep-lib submoduleJan Lindström2022-11-291-0/+0
|
* Update wsrep-libJan Lindström2022-05-031-0/+0
|
* Galera test failure on galera_bf_abort_ps_bindDaniele Sciascia2022-03-301-0/+0
| | | | | | | Fix a possible crash on my_free() due to the use of strdup() versus my_strdup(), and a memory leak. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-17441 fixup: Remove unused my_atomic long macrosMarko Mäkelä2022-03-241-0/+0
|
* Fixup for MDEV-27553Daniele Sciascia2022-03-181-0/+0
| | | | | | | | Update wsrep-lib which contains a fixup introduced with MDEV-27553. Also, adapt the corresponding test: after apply failure on ROLLBACK, node will disconnect from cluster Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-27615 Assertion `server_id.is_undefined() == false' failedDaniele Sciascia2022-01-271-0/+0
| | | | | | | Add test case that reproduces the issue and update wsrep-lib submodule to include the fix. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-27553 Assertion `inited==INDEX' failed: in ha_index_end()Daniele Sciascia2022-01-241-0/+0
| | | | | | | In wsrep_schema code, call ha_index_end() only if the corresponding ha_index_init() call succeeded. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* Update wsrep-lib submoduleJan Lindström2021-12-201-0/+0
|
* wsrep-lib update: bugfixes, cleanups, event API, state transition cleanupsbb-10.4-wsrep-libAlexey Yurchenko2021-12-081-0/+0
| | | | Don't switch state to DONOR in `wsrep_sst_donate()` - wsrep-lib does it now
* MDEV-26707 SR transaction rolls back locally, but not in clusterbb-10.4-MDEV-26707-galeraDaniele Sciascia2021-10-121-0/+0
| | | | | | Update wsrep-lib, and add MTR test case for MDEV-26707 Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* Update wsrep-lib submoduleJan Lindström2021-09-241-0/+0
|
* Update wsrep-lib submodulebb-10.4-MDEV-25718Jan Lindström2021-09-061-0/+0
|
* Update result files for Galera library 26.4.9Jan Lindström2021-07-271-0/+0
|
* MDEV-25551 applying crash with tables without PKsjaakola2021-05-261-0/+0
| | | | | | | | | | | | | | | | | | | | | | The underlying problem with MDEV-25551 turned out to be that transactions having changes for tables with no primary key, were not safe to apply in parallel. This is due to excessive locking in innodb side, and even non related row modifications could end up in lock conflict during applying. The fix for MDEV-25551 has disabled parallel applying for tables with no PK. This fix depends on change for wsrep-lib, where a separate PR allows application to modify transaction flags in wsrep-lib. This commit has also separate mtr test for verifying that transactions modifying a table with no primary key, will not apply in parallel. This test is a modified version of initial test created by Gabor Orosz, the reporterr of MDEV-25551. Another mtr test was added in galera_sr suite, for testing if modifying tables with no primary key would causes issues for streaming replication use cases. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* Update wsrep-libbb-10.4-wsrepJan Lindström2021-04-301-0/+0
|
* Update wsrep-libJan Lindström2021-01-081-0/+0
|
* Update wsrep-lib (new logger interface)Alexey Yurchenko2021-01-071-0/+0
| | | | | | Ensure consistent use of logging macros in wsrep-related code Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-24255 MTR test galera_bf_abort fails with --ps-protocolTeemu Ollakka2020-12-281-0/+0
| | | | | | | | | | | | | | | Under ps-protocol, commandsl like COM_STMT_FETCH, COM_STMT_CLOSE and COM_STMT_SEND_LONG_DATA are not supposed to return errors. Therefore, if a transaction is BF aborted and the client is processing one of those commands, then we should not return a deadlock error immediately. Instead wait for the a subsequent client interaction which permits errors to be returned. To handle this, wsrep_before_command() now accepts parameter keep_command_error. If set true, keep_command_error will cause wsrep-lib side to skip result handling, and to keep the current error for the next interaction with the client. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* Update wsrep-libDaniele Sciascia2020-11-111-0/+0
| | | | Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-23623 - Fix assertion in MTR test galera_sr.GCF-1051Daniele Sciascia2020-10-281-0/+0
| | | | | | | | | | | | Fix assertion `thd->in_active_multi_stmt_transaction() || thd->m_transaction_psi == __null' failed on MTR test galera_sr.GCF-1051. Add a new MTR test MDEV-23623 that reproduces the issue deterministically and update wsrep-lib submodule, containing the actual fix. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-19603 MariaDB 10.4 does not build on OpenBSD due to the use of libdlSergei Golubchik2020-07-311-0/+0
|
* MDEV-21718 Assertion in wsrep::client_state::before_command().Teemu Ollakka2020-07-241-0/+0
| | | | | | | | | | | | | | An assertion `server_state_.rollback_mode() == wsrep::server_state::rm_async` fired in before_command() when - thread-handling was set to pool-of-threads and - a BF abort happened between client session calls to wait_rollback_complete_and_acquire_ownership() and before_command(). This commit introduces a test case to reproduce the crash and updates wsrep-lib submodule to fixed version.
* Update wsrep-lib version: improved error logging and diagnosticsAlexey Yurchenko2020-07-241-0/+0
|
* MDEV-22051: Protocol::end_statement(): Assertion `0' failed on Galera node ↵bb-10.4-MDEV-22051mkaruza2020-04-081-0/+0
| | | | | | | upon DDL attempt with conflicting lock If FTWRL is issued, DDL statements should report error back to user before TOI is started.
* Wsrep position not updated in InnoDB after certification failures (#1432)Daniele Sciascia2020-01-141-0/+0
| | | | | | | | | | | | | | | A certification failure followed by a clean shutdown would cause an inconsistency between the sequence number stored in innodb and the sequence number stored in provider. This happened both in the case of local certification failure, and in the case where dummy writeset is applied. The fix consists of: - updating wsrep position after dummy writeset is delivered in `Wsrep_high_priority_service::log_dummy_write_set()` - updating wsrep position while releasing commit order in wsrep-lib side Added two tests which stress the situation where a server is shutdown after a certification failure.
* MDEV-20793 Assertion failed after replay.Teemu Ollakka2019-12-311-0/+0
| | | | | | | | Assertion failed in wsrep-lib after transaction replay which failed due to conflict in certification. - Implemented reproducible test case MDEV-20793 to reproduce the crash. - Fixed wsrep-lib to deal with certification error during replay.
* Update wsrep-lib. (#1426)Teemu Ollakka2019-12-161-0/+0
| | | | This commit updates the wsrep-lib. The changes are a cleanup in client_state TOI processing and stub methods for future extensions.
* MDEV-21229 Update wsrep-lib to deal with libstdc++ vector assertion (#1423)Teemu Ollakka2019-12-091-0/+0
| | | | | | The assertion was caused by use of operator[] for an empty vector. The wsrep-lib update changes vector operations which access the underlying data array to use data() method which is valid for empty vectors.
* MDEV-17099 Preliminary changes for Galera XA support (#1404)Daniele Sciascia2019-10-301-0/+0
| | | | | Redo changes reverted in commit 8f46e3833c7acb3ec3e4c7b389ae8cdd98eff1ce, this time without build issues in wsrep-lib.
* Revert MDEV-17099 Preliminary changes for Galera XA support (#1401)Marko Mäkelä2019-10-281-0/+0
| | | | | This reverts commit 2b5f4b3ed68585b310b7ebede474928ff90d9aa2 due to build failures.
* MDEV-17099 Preliminary changes for Galera XA support (#1401)Daniele Sciascia2019-10-241-0/+0
| | | Update wsrep-lib, and adapt to wsrep-lib interface changes.
* MDEV-19826 10.4 seems to crash with "pool-of-threads" (#1370)Teemu Ollakka2019-08-301-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MariaDB 10.4 was crashing when thread-handling was set to pool-of-threads and wsrep was enabled. There were two apparent reasons for the crash: - Connection handling in threadpool_common.cc was missing calls to control wsrep client state. - Thread specific storage which contains thread variables (THR_KEY_mysys) was not handled appropriately by wsrep patch when pool-of-threads was configured. This patch addresses the above issues in the following way: - Wsrep client state open/close was moved in thd_prepare_connection() and end_connection() to have common handling for one-thread-per-connection and pool-of-threads. - Thread local storage handling in wsrep patch was reworked by introducing set of wsrep_xxx_threadvars() calls which replace calls to THD store_globals()/reset_globals() and deal with thread handling specifics internally. Wsrep-lib was updated to version which relaxes internal concurrency related sanity checks. Rollback code from wsrep_rollback_process() was extracted to separate calls for better readability. Post rollback thread was removed as it was completely unused.
* - wsrep-lib update (SR cleanups and voting support) (#1359)Alexey Yurchenko2019-07-221-0/+0
| | | - TOI error ignoring fix (wsrep_ignore_apply_errors)
* Wsrep crash caused by COM_CHANGE_USER, COM_RESET_CONNECTION (#1358)Teemu Ollakka2019-07-151-0/+0
| | | | | | | | | | | | COM_CHANGE_USER and COM_RESET_CONNECTION commands cause THD::cleanup() to be called in the middle of command handling. This causes wsrep client_state sanity checks to fail. As a fix, temporarily close wsrep client_state before THD::change_user() is called when handling COM_CHANGE_USER and COM_RESET_CONNECTION, and restore the state after THD::change_user() returns. This commit also updates wsrep-lib to version which removes exception usage in wsrep client_state sanity checks.
* Fixed wsrep replaying for stored procedures (#1256)mariadb-10.4.4Teemu Ollakka2019-04-061-0/+0
| | | | | | | | | | | | | - Changed replaying to always allocate a separate THD object for applying log events. This is to avoid tampering original THD state during replay process. - Return success from sp_instr_stmt::exec_core() if replaying succeeds. - Do not push warnings/errors into diagnostics area if the transaction must be replayed. This is to avoid reporting transient errors to the client. Added two tests galera_sp_bf_abort, galera_sp_insert_parallel. Wsrep-lib position updated.
* Merge pull request #1222 from codership/10.4-clear-sr-bugfixLeandro Pacheco2019-03-111-0/+0
| | | MTR tests for clearing orphaned SR transactions in Galera
* MDEV-18631 Fix streaming replication with wsrep_gtid_mode=ONTeemu Ollakka2019-03-041-0/+0
| | | | | | | | | | | | | With wsrep_gtid_mode=ON, the appropriate commit hooks were not called in all cases for applied streaming transactions. As a fix, removed all special handling of commit order critical section from Wsrep_high_priority_service and Wsrep_storage_service. Now commit order critical section is always entered in ha_commit_trans(). Check for wsrep_run_commit_hook is now done in handler.cc, log.cc. This makes it explicit that the transaction is an active wsrep transaction which must go through commit hooks.
* Simplified Wsrep_client_service::interrupted()Teemu Ollakka2019-02-251-0/+0
| | | | | | | | Wsrep-lib is now guaranteed to hold the underlying mutex which is wrapped in lock object passed to Wsrep_client_service interrupted() call. The library part will now take care of checking the wsrep::transaction specific state, so it is enough to check the thd->killed state for the result.
* Fixes to streaming replication BF abortsTeemu Ollakka2019-02-251-0/+0
| | | | | | | | | | | | The InnoDB DeadlockChecker::check_and_resolve() was missing a call to wsrep_handle_SR_rollback() in the case when the transaction running deadlock detection was chosen as victim. Refined wsrep_handle_SR_rollback() to skip store_globals() calls if the transaction was BF aborting itself. Made mysql-wsrep-features#165 more deterministic by waiting until the update is in progress before sending next update.
* Fixed replaying bugs found with multimaster loadTeemu Ollakka2019-02-191-0/+0
| | | | | | | | | | | | | The replayer did not signal replaying waiters. Added mysql_cond_broadcast() after replaying is over. Assertion on client error failed after replay attempt failed due to certification failure. At this point the transaction does not go through client state, so the client error cannot be overridden. Assign ER_LOCK_DEADLOCK to thd directly instead. Use timed cond wait when waiting for replayers to finish and check if the transaction has been BF aborted during the wait.
* MDEV-18585 Avoid excessive Annotate_rows_log_events in binlogTeemu Ollakka2019-02-181-0/+0
| | | | | | | | | | | | | Make sure that the Annotate_rows_log_events is written into binlog only for the first fragment of the current statement. Also avoid flusing pending rows event when calculating bytes generated by the transaction. Added and recorded a test which verifies that the binlog contains only one Annotate_rows_log_event per statement with various SR settings. Recrded mysql-wsrep-features#136 which produced different output with excession log events suppressed.
* WSREP debug log levels supportmkaruza2019-02-131-0/+0
| | | | | Global variable wsrep_debug now can be used to filter wsrep-lib messages based on debug level provided. Type of wsrep_debug is now set to be unsigned int, so tests and configuration files changed accordingly.
* Implement wsrep_load_data_splitting with streaming replicationTeemu Ollakka2019-02-121-0/+0
| | | | | | | | | If wsrep_load_data_splitting is configured, change streaming replication parameters internally to match the original behavior, i.e. replicate on every 10000 rows. After load data is over, restore original streaming replication settings. Removed redundant wsrep_tc_log_commit().
* Updated wsrep-lib to galera cache encryption implementationmkaruza2019-02-011-0/+0
|
* Updated wsrep-lib to have more permissive compiler options by defaultTeemu Ollakka2019-01-251-0/+0
| | | | | | | WSREP_LIB_MAINTAINER_MODE was introduced in wsrep-lib cmake options to enable -Werror. The maintainer mode is disabled by default in order not to fail compilation on every compiler warning. The wsrep-lib maintainer mode can be enabled via -DWSREP_LIB_MAINTAINER_MODE:BOOL=ON.
* Update wsrep-lib to have OSX compilation fixesTeemu Ollakka2019-01-231-0/+0
|
* Galera4Brave Galera Crew2019-01-231-0/+0