Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13039

innodb_fast_shutdown=0 may fail to purge all undo logs

    Details

      Description

      When a slow shutdown is performed soon after creating some activity for fts_optimize_thread(), it is possible that the optimize thread is starting new transactions after the purge has finished. This is violating the specification of innodb_fast_shutdown, namely that the purge must be completed. (None of the history of new transactions would be purged.)

      The proper fix would seem to declare a flag that indicates whether undo-log-generating background threads are active:

      /** Shut down background threads that can generate undo log. */
      void
      srv_shutdown_bg_undo_sources()
      {
      	if (srv_bg_undo_sources) {
      		ut_ad(!srv_read_only_mode);
      		fts_optimize_shutdown();
      		dict_stats_shutdown();
      		srv_bg_undo_sources = false;
      	}
      }
      

      As long as this flag is set, srv_purge_should_exit() must return false.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marko Marko Mäkelä
                Reporter:
                marko Marko Mäkelä
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: