diff options
| author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-09-05 12:28:46 +0300 |
|---|---|---|
| committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-09-05 12:28:46 +0300 |
| commit | d5aed991de77206782d05b95676eaa47d23efcbe (patch) | |
| tree | 56f2f1d98cb893efbf7e9f6bbc4b54b4f53cfe40 | |
| parent | 91070fb01b4bc607a6236ee60093b8ff306895e3 (diff) | |
| download | mariadb-git-d5aed991de77206782d05b95676eaa47d23efcbe.tar.gz | |
trx_rollback_recovered(): Add a clarification
| -rw-r--r-- | storage/innobase/trx/trx0roll.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc index 2a2d2c3a315..80f1e76a6c2 100644 --- a/storage/innobase/trx/trx0roll.cc +++ b/storage/innobase/trx/trx0roll.cc @@ -828,6 +828,18 @@ void trx_rollback_recovered(bool all) ut_ad(!srv_undo_sources); ut_ad(srv_fast_shutdown); discard: + /* Note: before kill_server() invoked innobase_end() via + unireg_end(), it invoked close_connections(), which should initiate + the rollback of any user transactions via THD::cleanup() in the + connection threads, and wait for all THD::cleanup() to complete. + So, no active user transactions should exist at this point. + + srv_undo_sources=false was cleared early in innobase_end(). + + Because there is no possible race condition with any + concurrent user transaction, we do not have to invoke + trx->commit_state() or wait for !trx->is_referenced() + before trx_sys.deregister_rw(trx). */ trx_sys.deregister_rw(trx); trx_free_at_shutdown(trx); } |
