HDDS-9233. listStatus() API is not correctly iterating cache.#5244
HDDS-9233. listStatus() API is not correctly iterating cache.#5244adoroszlai merged 12 commits intoapache:masterfrom
Conversation
|
@smengcl @sumitagrawl Pls review. |
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
Outdated
Show resolved
Hide resolved
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.
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneListStatusHelper.java
Outdated
Show resolved
Hide resolved
|
Nit: "Investigate ..." sounds like a task, not a code change. Please update the PR title to describe the change itself. |
|
Test failure seems related: https://github.com/devmadhuu/ozone/actions/runs/6107000532/job/16573141510#step:5:3771 |
…st in TestKeyManagerImpl.
Done. |
This is fixed. |
|
Ran @sadanand48 @sumitagrawl please check if you're OK with the latest patch |
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneListStatusHelper.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
Outdated
Show resolved
Hide resolved
Thanks @adoroszlai . #5093 might address @devmadhuu Patch lgtm in its current state. I just have some nits regarding the code comments. |
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
Show resolved
Hide resolved
|
Full integration (filesystem) test also passed 10x. |
|
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.