maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #05097
Re: reducing fsyncs during handlerton->prepare and handlerton->commit in 5.6
Zardosht Kasheff <zardosht@xxxxxxxxx> writes:
> - in MySQL 5.6 and MariaDB 10.0, what are the fsyncing requirements
> for storage engines during prepare and commit?
> - are there new APIs that the storage engine must comply with in
> order to get these benefits?
In MariaDB 10.0, there is a new commit_checkpoint_request handlerton
method. If the storage engine implements that, it need not do the fsync() at
commit. It must also implement the commit_ordered method from 5.3.
Check comments in sql/handler.h for these two methods, and let me know if
there are any questions. The intention is that storage engines need not do
much extra work for this functionality, eg. the patch for InnoDB support was a
couple hundred lines at most IIRC.
> - in MySQL 5.6, I see new handlerton methods commit_low and
> prepare_low. What do these APIs do? What is their contract?
I think MySQL developers should answer for this. But it is related to this new
check in InnoDB:
thd_requested_durability(trx->mysql_thd) == HA_IGNORE_DURABILITY
And the existing flush_logs handlerton method is also used. My guess is that
commit_low is just internal server stuff that the storage engine does not need
to consider.
The MySQL 5.6 mechanism is mostly the same as the MariaDB 10.0 one in what it
actually does, but they did not bother to try to be compatible with the
storage engine API in MariaDB 5.3. So looks like it is #ifdef time for you if
you want to support both.
- Kristian.