Skip to content

Commit

Permalink
MDEV-21158 trx_undo_seg_free() is never redo-logged
Browse files Browse the repository at this point in the history
As part of commit 3c09f14
trx_undo_commit_cleanup() was always invoked with noredo=true.

The impact of this should be that some undo log pages may not be
correctly freed if the server is killed and crash recovery will be
performed. Similarly, if mariabackup --backup is being executed
concurrently with user transaction commits, it could happen that some
undo log pages in the backup will never be marked as free for reuse.

It seems that this bug should not have any user-visible
impact other than some undo pages being wasted.
  • Loading branch information
dr-m committed Nov 27, 2019
1 parent bf58ec7 commit 3fc1f62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/innobase/trx/trx0undo.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 2018, MariaDB Corporation.
Copyright (c) 2014, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -1607,7 +1607,7 @@ trx_undo_commit_cleanup(trx_undo_t* undo, bool is_temp)

/* Delete first the undo log segment in the file */
mutex_exit(&rseg->mutex);
trx_undo_seg_free(undo, true);
trx_undo_seg_free(undo, is_temp);
mutex_enter(&rseg->mutex);

ut_ad(rseg->curr_size > undo->size);
Expand Down

0 comments on commit 3fc1f62

Please sign in to comment.