[ 
https://issues.apache.org/jira/browse/HDDS-14239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Swaminathan Balachandran updated HDDS-14239:
--------------------------------------------
    Description: 
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.

 

  was:
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.

 


> Simplify Prepare Batch looping for DeleteRange Op processing in 
> RDBBatchOperation
> ---------------------------------------------------------------------------------
>
>                 Key: HDDS-14239
>                 URL: https://issues.apache.org/jira/browse/HDDS-14239
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Swaminathan Balachandran
>            Assignee: Swaminathan Balachandran
>            Priority: Major
>
> 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.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to