MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
Kristian Nielsen d039346a7a MDEV-4991: GTID binlog indexing
Improve the performance of slave connect using B+-Tree indexes on each binlog
file. The index allows fast lookup of a GTID position to the corresponding
offset in the binlog file, as well as lookup of a position to find the
corresponding GTID position.

This eliminates a costly sequential scan of the starting binlog file
to find the GTID starting position when a slave connects. This is
especially costly if the binlog file is not cached in memory (IO
cost), or if it is encrypted or a lot of slaves connect simultaneously
(CPU cost).

The size of the index files is generally less than 1% of the binlog data, so
not expected to be an issue.

Most of the work writing the index is done as a background task, in
the binlog background thread. This minimises the performance impact on
transaction commit. A simple global mutex is used to protect index
reads and (background) index writes; this is fine as slave connect is
a relatively infrequent operation.

Here are the user-visible options and status variables. The feature is on by
default and is expected to need no tuning or configuration for most users.

binlog_gtid_index
  On by default. Can be used to disable the indexes for testing purposes.

binlog_gtid_index_page_size (default 4096)
  Page size to use for the binlog GTID index. This is the size of the nodes
  in the B+-tree used internally in the index. A very small page-size (64 is
  the minimum) will be less efficient, but can be used to stress the
  BTree-code during testing.

binlog_gtid_index_span_min (default 65536)
  Control sparseness of the binlog GTID index. If set to N, at most one
  index record will be added for every N bytes of binlog file written.
  This can be used to reduce the number of records in the index, at
  the cost only of having to scan a few more events in the binlog file
  before finding the target position

Two status variables are available to monitor the use of the GTID indexes:

  Binlog_gtid_index_hit
  Binlog_gtid_index_miss

The "hit" status increments for each successful lookup in a GTID index.
The "miss" increments when a lookup is not possible. This indicates that the
index file is missing (eg. binlog written by old server version
without GTID index support), or corrupt.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2024-01-27 12:09:54 +01:00
.github Explicitly recommend target branches in CODING_STANDARDS 2023-12-14 16:32:42 +00:00
BUILD Merge branch '10.5' into 10.6 2023-12-17 11:20:43 +01:00
client Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
cmake MDEV-33096 mysys/my_timezone.cc does not compile on AIX 2023-12-22 13:17:55 +01:00
dbug
debian Merge remote-tracking branch '11.3' into 11.4 2023-12-21 15:40:55 +01:00
Docs
extra Merge 11.2 into 11.3 2024-01-05 14:20:35 +02:00
include MDEV-30879 Add support for up to BASE 62 to CONV() 2024-01-17 15:24:26 +00:00
libmariadb@458a4396b4
libmysqld MDEV-4991: GTID binlog indexing 2024-01-27 12:09:54 +01:00
libservices Merge branch '10.4' into 10.5 2023-12-02 01:02:50 +01:00
man
mysql-test MDEV-4991: GTID binlog indexing 2024-01-27 12:09:54 +01:00
mysys MDEV-33096 mysys/my_timezone.cc does not compile on AIX 2023-12-22 13:17:55 +01:00
mysys_ssl
plugin Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
randgen/conf
scripts Update 11.4 HELP 2024-01-23 20:51:35 +11:00
sql MDEV-4991: GTID binlog indexing 2024-01-27 12:09:54 +01:00
sql-bench
sql-common Merge branch '10.5' into 10.6 2023-12-17 11:20:43 +01:00
storage MDEV-28861 Deprecate spider table options by comment/connection 2024-01-24 12:18:18 +11:00
strings MDEV-30879 Add support for up to BASE 62 to CONV() 2024-01-17 15:24:26 +00:00
support-files Merge remote-tracking branch '11.3' into 11.4 2023-12-21 15:40:55 +01:00
tests Merge branch '11.1' into 11.2 2023-12-20 23:43:05 +01:00
tpool Merge 10.6 into 10.11 2023-11-22 18:14:11 +02:00
unittest Merge remote-tracking branch '11.3' into 11.4 2023-12-21 15:40:55 +01:00
vio
win Merge 11.2 into 11.3 2024-01-05 14:20:35 +02:00
wsrep-lib@a5d95f0175
zlib
.clang-format
.gitattributes
.gitignore
.gitlab-ci.yml
.gitmodules
appveyor.yml
BUILD-CMAKE
CMakeLists.txt
CODING_STANDARDS.md Explicitly recommend target branches in CODING_STANDARDS 2023-12-14 16:32:42 +00:00
config.h.cmake MDEV-33096 mysys/my_timezone.cc does not compile on AIX 2023-12-22 13:17:55 +01:00
configure.cmake MDEV-33096 mysys/my_timezone.cc does not compile on AIX 2023-12-22 13:17:55 +01:00
CONTRIBUTING.md
COPYING
CREDITS
INSTALL-SOURCE
INSTALL-WIN-SOURCE
KNOWN_BUGS.txt
README.md
SECURITY.md
THIRDPARTY
VERSION bump the VERSION 2023-11-23 14:35:34 +01:00

Code status:

  • Appveyor CI status ci.appveyor.com

MariaDB: The open source relational database

MariaDB was designed as a drop-in replacement of MySQL(R) with more features, new storage engines, fewer bugs, and better performance.

MariaDB is brought to you by the MariaDB Foundation and the MariaDB Corporation. Please read the CREDITS file for details about the MariaDB Foundation, and who is developing MariaDB.

MariaDB is developed by many of the original developers of MySQL who now work for the MariaDB Corporation, the MariaDB Foundation and by many people in the community.

MySQL, which is the base of MariaDB, is a product and trademark of Oracle Corporation, Inc. For a list of developers and other contributors, see the Credits appendix. You can also run 'SHOW authors' to get a list of active contributors.

A description of the MariaDB project and a manual can be found at:

https://mariadb.org

https://mariadb.com/kb/en/

https://mariadb.com/kb/en/mariadb-vs-mysql-features/

https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/

https://mariadb.com/kb/en/new-and-old-releases/

Help

More help is available from the Maria Discuss mailing list https://launchpad.net/~maria-discuss, MariaDB's Zulip instance, https://mariadb.zulipchat.com/

Live QA for beginner contributors

MariaDB has a dedicated time each week when we answer new contributor questions live on Zulip. From 8:00 to 10:00 UTC on Mondays, and 10:00 to 12:00 UTC on Thursdays, anyone can ask any questions theyd like, and a live developer will be available to assist.

New contributors can ask questions any time, but we will provide immediate feedback during that interval.

Licensing


NOTE:

MariaDB is specifically available only under version 2 of the GNU General Public License (GPLv2). (I.e. Without the "any later version" clause.) This is inherited from MySQL. Please see the README file in the MySQL distribution for more information.

License information can be found in the COPYING file. Third party license information can be found in the THIRDPARTY file.


Bug Reports

Bug and/or error reports regarding MariaDB should be submitted at: https://jira.mariadb.org

For reporting security vulnerabilities, see our security-policy.

The code for MariaDB, including all revision history, can be found at: https://github.com/MariaDB/server