Issue with Remote Compaction
Opened this issue · 0 comments
Description&Problem:
I am currently using the remote compaction feature in RocksDB. On the client side, I implement Schedule and Wait, and it acts as the primary DB. On the server side, I use OpenAndCompact, and it serves as the secondary DB.
The first remote compaction works as expected. However, during the second remote compaction attempt, the server encounters an error:【 IO error: GetFileSize failed】
This error occurs because the server attempts to call GetFileSize to access the SST files on the client side, but the SST files have already been deleted.
Investigation:
I found the reason is as follows:
During the first remote compaction, the client side successfully loads the SST files sent from the server and deletes some SST files. At the same time, the manifest log is appended.
On the second remote compaction, when OpenAndCompact is called, it loads the manifest. However, it still tries to read the deleted SST files, leading to the error mentioned above.
Concern:
I am unsure if this behavior is intended. My expectation is that, while loading the manifest in OpenAndCompact, it should not attempt to read SST files that have been deleted. This seems to be causing the issue.
Any insights or guidance on this matter would be greatly appreciated. Thank you!