Clever / ARCHIVED-oplog-replay

Replay mongodb oplogs at variable speed
Apache License 2.0
3 stars 1 forks source link

Support fixed rate oplog replaying (ops per second) #13

Closed kvigen closed 10 years ago

kvigen commented 10 years ago

This change adds an interface for controlling the rate at which we apply op logs. Theoretically this interface could control the rate at which more generic things are done. Though it's similar to the leakybucket abstraction we already have, the relative rate ideas we have didn't cleanly map onto the leakybucket so I thought this new interface was useful. The interface returns the amount of time to wait before applying an oplog entry.

This change also adds to implementations of the interface. The fixed and relative rate controllers we want for oplogs. It also adds a new command line parameter to control which rate controller we use in the replay. It defaults to the fixed rate.

kvigen commented 10 years ago

https://github.com/Clever/oplog-replay/commit/03ab5ec4eecfded925c9feb06f8d69c24623bb49

azylman commented 10 years ago

This is such a good PR. lgtm, barring minor comments left