sapling/eden/mononoke/blobstore_sync_queue
Thomas Orozco 6da3dc939a mononoke/blobstore_sync_queue: delete in smaller batches
Summary:
Our blobstore_sync_queue selects entries with a limit on the number of unique
keys it's going to load. Then, it tries to delete them. However, the number of
entries might be (much) bigger than the number of keys. When we try to delete
them, we time out waiting for MySQL because deleting 100K entries at once isn't
OK.

This results in crashlooping in the healer, where we start, delete 100K
entries, then time out.

This is actually double bad, because when we come back up we just go wihhout
checking replication lag first, so if we're crashlooping, we disregard the
damage we're doing in MySQL (I'm fixing this later in this stack).

So, let's be a bit more disciplined, and delete keys 10K at a time, at most.

Reviewed By: HarveyHunt

Differential Revision: D19997588

fbshipit-source-id: 2262f9ba3f7d3493d0845796ad8f841855510180
2020-02-20 12:26:50 -08:00
..
schemas Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
src mononoke/blobstore_sync_queue: delete in smaller batches 2020-02-20 12:26:50 -08:00
test Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00