-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-9041. Intermittent Delete root failed. #5204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@sumitagrawl - Pls review. |
sumitagrawl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devmadhuu Thanks for working over this, LGTM
| HeapEntry entry = heapIterator.next(); | ||
| OzoneFileStatus status = entry.getStatus(prefixKey, | ||
| scmBlockSize, volumeName, bucketName, replication); | ||
| map.put(entry.key, status); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this is done with the assumption that the items from the cache iterator always come before those from the rockdb iterator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes @duongkame as per MinHeapIterator implementation.
| } | ||
|
|
||
| return map.values(); | ||
| return map.values().stream().filter(e -> e != null).collect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the status ever be null? If it can be, will putting the null check before putting it in the map a better idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@duongkame thanks for review. Earlier the null value (means key deleted) from CacheIter was not added in map and was getting lost, so we should allow that and when keyInfo gets null and then getStatus , we'll return null. This was needed to allow deleted key in cache.
duongkame
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, @devmadhuu . LGTM.
(cherry picked from commit 011de37) Change-Id: Ifad4eff7e6089467f0249c3435b36a8ff78eeffa
What changes were proposed in this pull request?
Intermittent Delete root failed where it is observed that listStatus for FSO returns deleted files. This is causing flaky for some test cases.
Problem: listStatus called before flush of double buffer can return deleted key / directory present in cache. And also old information from db.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9041
How was this patch tested?
This patch is tested by executing existing flaky test cases which is now running fine.