-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
HADOOP-17301. ABFS: Fix bug introduced in HADOOP-16852 which reports read-ahead error back #2369
Conversation
Tests were run on accounts on East US 2 region. HNS-OAuth
HNS-SharedKey
NonHNS-SharedKey
|
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.
LGTM, some minor tuning but otherwise good to go in
...ols/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/ReadBufferManager.java
Outdated
Show resolved
Hide resolved
...ols/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/ReadBufferManager.java
Show resolved
Hide resolved
@@ -49,6 +49,7 @@ | |||
private static final int TWO_KB = 2 * 1024; | |||
private static final int THREE_KB = 3 * 1024; | |||
private static final int REDUCED_READ_BUFFER_AGE_THRESHOLD = 3000; // 3 sec | |||
private static final int INCREASED_READ_BUFFER_AGE_THRESHOLD = 30000; // 30 sec |
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.
use 30_000
style integer
...s/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestAbfsInputStream.java
Outdated
Show resolved
Hide resolved
...s/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestAbfsInputStream.java
Outdated
Show resolved
Hide resolved
🎊 +1 overall
This message was automatically generated. |
Test results from accounts on East US 2 region: NON-HNS:
HNS:
|
@steveloughran - Thanks for your review. I have updated this PR with the suggestions. |
+1, merged to trunk. @snvijaya -before I backport it, can you do a cherrypick of this into branch-3.3 and verify all the tests are good? thanks |
…nt (apache#2369) Fixes read-ahead buffer management issues introduced by HADOOP-16852, "ABFS: Send error back to client for Read Ahead request failure". Contributed by Sneha Vijayarajan
Thanks a lot @steveloughran . I have created a backport PR for this change. Tests went well, have pasted the result in the backport PR. |
…nt (#2369) Fixes read-ahead buffer management issues introduced by HADOOP-16852, "ABFS: Send error back to client for Read Ahead request failure". Contributed by Sneha Vijayarajan
…nt (apache#2369) Fixes read-ahead buffer management issues introduced by HADOOP-16852, "ABFS: Send error back to client for Read Ahead request failure". Contributed by Sneha Vijayarajan
…fer management (apache#2369) Fixes read-ahead buffer management issues introduced by HADOOP-16852, "ABFS: Send error back to client for Read Ahead request failure". Contributed by Sneha Vijayarajan Backport Notes: Mockito backport issues Change-Id: I1a45c3c3ba5258ab61d495392a2821f35748d6a7
When reads done by readahead buffers failed, the exceptions where dropped and the failure was not getting reported to the calling app.
Jira HADOOP-16852: Report read-ahead error back
tried to handle the scenario by reporting the error back to calling app. But the commit has introduced a bug which can lead to ReadBuffer being injected into read completed queue twice when it has finished the store operation.
Additionally, in a scenario where all readahead buffers are exhausted and the buffer chosen to evict is one which is failed read, there is no buffer returned for other reads to use. But successful eviction leads the queuing logic to determine there is a free buffer and while fetching the buffer index from free list, can lead to EmptyStack exceptions.
This PR fixes both these issues and also has added test checks for both scenarios.