swamirishi opened a new pull request, #9553: URL: https://github.com/apache/ozone/pull/9553
## What changes were proposed in this pull request? Currently the PrepareBatchOperation looping is very convoluted. It also misses a case where a putKey/deleteKey can get added even though a deleteRange has been executed in the next batch after the following continuousDeleteRange batch. The following example will explain the scenario better. 1) Put Key1 2) DeleteRange Key2 - Key5 3) Put Key2 4) DeleteRange Key1 - Key4 Here the operation 1 should ideally be cancelled by Op4. But currently both Op1 & OP4 gets executed however it would be more optimal to just execute Op4 & Op1 is redundant. This was done consciously before since deleteRange as an op was only going to be used by snapshot create. But the deleteRange is also going to be used by DirectoryPurgeRequest removing entries from the file table and directory table. This optimization would help reduce complexity of rocksdb compactions if a key is committed and also deleted within the same double buffer batch. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-14239 ## How was this patch tested? Updated unit tests. I intend to add another unit test suggested in this comment https://github.com/apache/ozone/pull/8774#discussion_r2644284592 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
