W3cubDocs

/MariaDB

InnoDB Data Scrubbing

MariaDB starting with 10.1.4

The description below applies to MariaDB 10.1.4 and later

Sometimes there is a requirement that when some data is deleted, it is really gone. This might be the case when one stores user's personal information or some other sensitive data. Normally though, when a row is deleted, the space is only marked as free on the page. It may eventually be overwritten, but there is no guarantee when that will happen. A copy of the deleted rows may also be present in the log files.

MariaDB 10.1.3 has introduced support for InnoDB/XtraDB data scrubbing. Background threads periodically scan tablespaces and logs and remove all data that should be deleted. The number of background threads for tablespace scans is set by innodb-encryption-threads. Log scrubbing happens in a separate thread.

To configure scrubbing one can use the following variables:

innodb-background-scrub-data-check-interval Seconds Check at this intervall if tablespaces needs scrubbing
innodb-background-scrub-data-compressed Boolean Enable scrubbing of compressed data by background threads
innodb-background-scrub-data-interval Seconds Scrub spaces that were last scrubbed longer than this many seconds ago.
innodb-background-scrub-data-uncompressed Boolean Enable scrubbing of uncompressed data by background threads
innodb-immediate-scrub-data-uncompressed Boolean Enable scrubbing of uncompressed data
innodb-scrub-log Boolean Enable redo log scrubbing
innodb-scrub-log-speed Bytes/sec Redo log scrubbing speed in bytes/sec

The Information Schema INNODB_TABLESPACES_SCRUBBING table contains scrubbing information.

Thanks

  • Scrubbing was donated to the MariaDB project by Google.
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/innodb-data-scrubbing/