| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
upon DDL attempt with conflicting lock
If FTWRL is issued, DDL statements should report error back to user before
TOI is started.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This commit updates the wsrep-lib. The changes are a cleanup in
client_state TOI processing and stub methods for future extensions.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Redo changes reverted in commit
8f46e3833c7acb3ec3e4c7b389ae8cdd98eff1ce, this time without build
issues in wsrep-lib.
|
|
|
|
|
| |
This reverts commit 2b5f4b3ed68585b310b7ebede474928ff90d9aa2
due to build failures.
|
|
|
| |
Update wsrep-lib, and adapt to wsrep-lib interface changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
- TOI error ignoring fix (wsrep_ignore_apply_errors)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
| |
MTR tests for clearing orphaned SR transactions in Galera
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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().
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|