Uh oh!
There was an error while loading. Please reload this page.
HDDS-9233. listStatus() API is not correctly iterating cache. - #5244
Conversation
devmadhuu
commented
Sep 4, 2023
@smengcl@sumitagrawl Pls review. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
sumitagrawl
left a comment
There was a problem hiding this comment.
@devmadhuu Thanks for working over this, have minor comment
| } | ||
| public static boolean isKeyDeleted(String key, Table keyTable) { | ||
| public static boolean isKeyDeleted(String key, Table keyTable) |
There was a problem hiding this comment.
The purpose of method is only check in cache, not in table. And as per caller, its checking in cache while iterate the table keys.
There was a problem hiding this comment.
The purpose of method is only check in cache, not in table. And as per caller, its checking in cache while iterate the table keys.
I have reverted the change.
Uh oh!
There was an error while loading. Please reload this page.
adoroszlai
commented
Sep 7, 2023
Nit: "Investigate ..." sounds like a task, not a code change. Please update the PR title to describe the change itself. |
adoroszlai
commented
Sep 7, 2023
Test failure seems related: https://github.com/devmadhuu/ozone/actions/runs/6107000532/job/16573141510#step:5:3771 |
…st in TestKeyManagerImpl.
devmadhuu
commented
Sep 8, 2023
Done. |
devmadhuu
commented
Sep 8, 2023
This is fixed. |
Ran @sadanand48@sumitagrawl please check if you're OK with the latest patch |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
smengcl
commented
Sep 8, 2023
Thanks @adoroszlai . #5093 might address @devmadhuu Patch lgtm in its current state. I just have some nits regarding the code comments. |
Uh oh!
There was an error while loading. Please reload this page.
adoroszlai
commented
Sep 9, 2023
Full integration (filesystem) test also passed 10x. |
adoroszlai
commented
Sep 9, 2023
Thanks @devmadhuu for the patch, @sadanand48, @smengcl, @sumitagrawl for the review. Merged, since this improves test results significantly. Let's address any further comments in a follow-up. |
…he. (apache#5244) (cherry picked from commit f1552bc) Change-Id: I07c1ec1d2c4f761af7401b8925bc2b335c4ef251
What changes were proposed in this pull request?
This PR is to fix flakiness in listStatus API. It was observed that, cleanup() method in TestOzoneFileSystem (in CI integration (filesystem)), which is triggered after EACH test method is incredibly flaky. However when we add a call to wait for double buffer flush, it no longer seems flaky.
Issue was related to a possible race condition where table cache iterator is flushed already and isKeyDeleted check may not work as expected before putting entries in cacheKeyMap in listStatus API.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9233
How was this patch tested?
This patch is tested with multiple job runs with 50 iterations of single test class to repro of flakiness of listStatus API which was flaky when called in deleteRootDir() method called from cleanup method. Here is the green CI run with multiple iterations of test run.