Skip to main content

MySQL Replication Prefetcher

Project description

This is a fork of [mysql@facebook’s work] (http://bazaar.launchpad.net/~mysqlatfacebook/mysqlatfacebook/tools/files/head:/prefetch/), but a little bit more pythonic.

This package provides some basic MySQL Slave Prefetching tools. It can be used to speed up MySQL statement-based replication by running statements ahead of the the replication thread to prefetch data. Rewriters are the functions responsible for transforming a replication statement to a statement you want to run. You can provide your own rewriter or use one of the two default rewriters - the rollback rewriter and the innodb fake changes rewriter.

None of the original authors or contributors are responsible for the damage you may cause by using this tool. Consider reading [this excellent post](http://dom.as/2011/12/03/replication-prefetching/) about replication delay before continuing.

rewriters

The rollback rewriter runs the statements as they come in, but issues a ROLLBACK instead of a COMMIT. While this is somewhat effective, MySQL is not well optimized for rollbacks. MySQL crashes have been observed from using this rewriter with a high level of concurrency.

The innodb fake changes rewriter takes advantage of a patch to MySQL. This patch is included in a couple of forks, including Facebook’s and Percona’s. The idea is the same as the rollback prefetcher, except running statements don’t actually cause any data changes before COMMIT. In fact, it is impossible to COMMIT with fake changes enabled. MySQL does all the work of executing the statement, but skips the writes.

Contributing

Pull requests are welcome, but note that this is not an actively maintained project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myprefetch-0.1.tar.gz (16.1 kB view details)

Uploaded Source

File details

Details for the file myprefetch-0.1.tar.gz.

File metadata

  • Download URL: myprefetch-0.1.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for myprefetch-0.1.tar.gz
Algorithm Hash digest
SHA256 6f4deee08875c178603cd44f0c66d5a9fb995bdd9d1b6fcbed14fb10ebd6d189
MD5 10833be723ef13dee2089e421b3fea01
BLAKE2b-256 0c393d328dcacefe6d8c9806eb57e3dd62ec0a5206d7834265d7c88411e7dc4b

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page