I am currently trying to understand the backup mechanism of FDB better (the way it is implemented and where in the code I can find it). And I was hoping that someone could give me some pointers.
My current high-level understanding is the following:
- When a backup starts, the client will that kicks off the backup writes a few keys into the \xff keyspace. But honestly I am not even sure what exactly it writes into it
- Then, backupagent is picking this up and executes range-queries against the normal key space.
- Simultaneously, all new mutations are written into another special keyspace (I think \xff/bklog is used for that)
- when BackupAgent is done reading the whole key range it also reads the bklog to fetch new mutations that occurred during this time.
However, I can’t really figure out where in the code this is happening? I would assume that the proxies are adding the Mutations to the bklog somewhere, but I can’t really find the code that is doing that. Also is there something else I am missing?
Furthermore I am not quite sure I understand how this TaskBucket thingy works that backupagent is using.
Any pointers to code or links to docs I missed would be greatly appreciated!