saxenapranav commented on code in PR #6025:
URL: https://github.com/apache/hadoop/pull/6025#discussion_r1329551732


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/StorageInterfaceImpl.java:
##########
@@ -315,6 +315,20 @@ public void delete(OperationContext opContext, 
SelfRenewingLease lease)
           null, opContext);
     }
 
+    @Override
+    public void delete(OperationContext opContext, SelfRenewingLease lease, 
String eTag)
+            throws StorageException {
+      AccessCondition accessCondition1 = getLeaseCondition(lease);
+      if (accessCondition1 != null && eTag != null) {
+        accessCondition1.setIfMatch(eTag);

Review Comment:
   Reason why i feel if we have a leaseId, it wont lead to consistency issues:
   1. Once a blob is leased by a process, only that process can make change to 
that blob, since it has the leaseId.
   2. If we see that we had to retry although the first call would be taken out 
of order and before it would be taken, some other process has created a blob on 
that path, now if server takes the first call to process, it should fail with: 
"There is currently no lease on the blob.", 412, DELETE; or if we say that 
other process create blob with lease, it will fail with: "The lease ID 
specified did not match the lease ID for the blob.", 412, DELETE.



-- 
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]

Reply via email to