storagemgr: Add reftable support to housekeeping
Now that reftables are supported in transaction manager, we also need to add support for reftables in housekeeping for transaction manager.
This is done in two steps:
- preparePackRefsReftable
- verifyPackRefsReftable
In the preparePackRefsReftable
stage, we make a note of the existing tables. Then we run compaction and note the tables which were deleted and those which were added and add them as operations on the transaction.
In the verifyPackRefsReftable
stage, we first check and ensure no other committed log entry modifies the tables which were compacted. We then merge 'tables.list' with the latest from the repo. This helps us to also acknowledge and keep new tables which were added concurrently. Then we add modification of 'tables.list' as an operation to the transaction.
There is nothing to do in the apply stage, since all the operations are tracked via the transaction as simply file operations.
Fix all the tests around this.
Closes #5867 (closed)