[
https://issues.apache.org/jira/browse/HADOOP-18872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17773410#comment-17773410
]
ASF GitHub Bot commented on HADOOP-18872:
-----------------------------------------
steveloughran commented on code in PR #6019:
URL: https://github.com/apache/hadoop/pull/6019#discussion_r1350517078
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsRestOperation.java:
##########
@@ -82,6 +82,11 @@ public class AbfsRestOperation {
*/
private String failureReason;
+ /**
+ * This variable stores the tracing context used for last Rest Operation
Review Comment:
add a . so all javadoc versions are happy. some JVMs blow up here
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemDelete.java:
##########
@@ -283,4 +288,24 @@ public void testDeleteIdempotencyTriggerHttp404() throws
Exception {
mockStore.delete(new Path("/NonExistingPath"), false,
getTestTracingContext(fs, false));
}
+ @Test
+ public void deleteBlobDirParallelThreadToDeleteOnDifferentTracingContext()
+ throws Exception {
+ Configuration configuration = getRawConfiguration();
+ AzureBlobFileSystem fs = Mockito.spy(
+ (AzureBlobFileSystem) FileSystem.newInstance(configuration));
+ AzureBlobFileSystemStore spiedStore = Mockito.spy(fs.getAbfsStore());
+ AbfsClient spiedClient = Mockito.spy(fs.getAbfsClient());
+
+ Mockito.doReturn(spiedStore).when(fs).getAbfsStore();
+ spiedStore.setClient(spiedClient);
+
+ fs.mkdirs(new Path("/testDir"));
+ fs.create(new Path("/testDir/file1"));
Review Comment:
add .close() or is mockito so involved these are no-ops?
> ABFS: Misreporting Retry Count for Sub-sequential and Parallel Operations
> -------------------------------------------------------------------------
>
> Key: HADOOP-18872
> URL: https://issues.apache.org/jira/browse/HADOOP-18872
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build
> Affects Versions: 3.3.6
> Reporter: Anmol Asrani
> Assignee: Anuj Modi
> Priority: Major
> Labels: Bug, pull-request-available
>
> There was a bug identified where retry count in the client correlation id was
> wrongly reported for sub-sequential and parallel operations triggered by a
> single file system call. This was due to reusing same tracing context for all
> such calls.
> We create a new tracing context as soon as HDFS call comes. We keep on
> passing that same TC for all the client calls.
> For instance, when we get a createFile call, we first call metadata
> operations. If those metadata operations somehow succeeded after a few
> retries, the tracing context will have that many retry count in it. Now when
> actual call for create is made, same retry count will be used to construct
> the headers(clientCorrelationId). Alhough the create operation never failed,
> we will still see retry count from the previous request.
> Fix is to use a new tracing context object for all the network calls made.
> All the sub-sequential and parallel operations will have same primary request
> Id to correlate them, yet they will have their own tracing of retry count.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]