SaketaChalamchala opened a new pull request, #8532:
URL: https://github.com/apache/ozone/pull/8532

   ## What changes were proposed in this pull request?
   
   In-flight snapshots requests are not decremented when a snapshot create 
request fails for ex., because snapshot already exists. This causes new 
snapshot requests to fail even though snapshots have not reached the limit. 
   Provided a fix for this issue.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-13150
   
   ## How was this patch tested?
   
   Unit Test: 
`org.apache.hadoop.ozone.om.request.snapshot.TestOMSnapshotCreateRequest#testSnapshotLimitWithFailures`
   
   Without this fix the test fails with 
   ```
   // When snapshot_limit=2. We created 1 snapshot. 1 Snapshot create fails. We 
try to create a snapshot after a previous request fails.
   [ERROR] 
org.apache.hadoop.ozone.om.request.snapshot.TestOMSnapshotCreateRequest.testSnapshotLimitWithFailures
 -- Time elapsed: 3.833 s <<< ERROR!
   TOO_MANY_SNAPSHOTS org.apache.hadoop.ozone.om.exceptions.OMException: 
Snapshot limit of 2 reached. Cannot create more snapshots. Current snapshots: 
1, In-flight creations: 1 If you already deleted some snapshots, please wait 
for the background service to complete the cleanup.
   ...
   
org.apache.hadoop.ozone.om.request.snapshot.OMSnapshotCreateRequest.preExecute(OMSnapshotCreateRequest.java:124)
        at 
org.apache.hadoop.ozone.om.request.snapshot.TestOMSnapshotCreateRequest.doPreExecute(TestOMSnapshotCreateRequest.java:444)
        at 
org.apache.hadoop.ozone.om.request.snapshot.TestOMSnapshotCreateRequest.doPreExecute(TestOMSnapshotCreateRequest.java:432)
        at 
org.apache.hadoop.ozone.om.request.snapshot.TestOMSnapshotCreateRequest.testSnapshotLimitWithFailures(TestOMSnapshotCreateRequest.java:348)
  
   ```
   


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