Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
Description
We recently found that after we deleted all the keys, the cluster will remain with some data. One of the reasons is due to this:
SCM will add deleted blocks into transactions when receiving the request from OM. when HA is enabled, DBTransactionbuffer is implemented as the SCMHADBTransactionbufferImpl. Inside this, the buffer will not be flushed immediately. Normally, it will be flushed when SCM takes a snapshot. The snapshot gap threshold is default 1000. If the user has little load pressure on the cluster (no writing more ratis logs), the buffer will be always pending in the memory. Real deletion happened in SCMBlockDeletingService, which will scan the DB and get the transactions, for those txns in-memory buffer, it won't find them.
This is why DN has not yet received these deleted block info.
We have three solutions:
- add a global view for all the deleted block transactions, but it will bring too much pressure on the memory.
- use `SCMDBTransactionBufferImpl` instead of SCMHADBTransactionBufferImpl in `DeletedBlockLog`. It could work but may be confusing. Why does it need the direst flush independently?
- Add a flush monitor/ check to trigger the non-empty flush, overall, this could be a common mechanism if some other cases like the deleted blocks appears in the future.
Attachments
Issue Links
- is related to
-
HDDS-7483 RocksDB BatchWriteWithIndex to handle SCM buffer transaction
-
- Resolved
-
- relates to
-
HDDS-6721 Ozone key deletion often dose not delete the real data blocks in datanode
-
- Resolved
-
-
RATIS-1583 Time / Temporal Based Ratis Snapshots
-
- Open
-
- links to