sravani-revuri commented on code in PR #12145:
URL: https://github.com/apache/ozone/pull/12145#discussion_r4678996379


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManagerImpl.java:
##########
@@ -221,9 +224,10 @@ public Pipeline createPipeline(ReplicationConfig 
replicationConfig,
       throws IOException {
     checkIfPipelineCreationIsAllowed(replicationConfig);
 
-    acquireWriteLock();
+    final Span span = 
TracingUtil.createInternalSpan("PipelineManagerImpl.createPipeline");
+    TracingUtil.executeInNewSpan("PipelineManagerImpl.acquireWriteLock", () -> 
acquireWriteLock());
     final Pipeline pipeline;
-    try {
+    try (Scope ignored = span.makeCurrent()) {

Review Comment:
   i think. we can move this line
   ```
   TracingUtil.executeInNewSpan("PipelineManagerImpl.acquireWriteLock", () -> 
acquireWriteLock());
   ```
   
   inside the try - catch so that it appears in proper order. right now i think 
it comes as such :
   
   - create pipeline
       - add pipeline
           - apply transactions
   - write lock
   
   adding it here will make it come like this:
   
   - create pipeline
      - write lock
          - add pipeline
              - apply transactions
   
   
   #### before:
   
   <img width="1427" height="483" alt="image" 
src="https://github.com/user-attachments/assets/4a649317-cbcd-4d6e-a780-b98b36f5ced8";
 />
   
   #### after:
   
   <img width="1426" height="478" alt="image" 
src="https://github.com/user-attachments/assets/a59e95da-a1d6-4775-951e-0788b4aa5f66";
 />
   



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/protocol/ScmBlockLocationProtocolServerSideTranslatorPB.java:
##########
@@ -192,8 +194,10 @@ private SCMBlockLocationResponse processMessage(
     } catch (IOException e) {
       RatisUtil.checkRatisException(e, scm.getBlockProtocolRpcPort(),
           scm.getScmId(), scm.getHostname(), ROLE_TYPE);
+      TracingUtil.recordExceptionInCurrentSpan(e);
       response.setSuccess(false);
       response.setStatus(exceptionToResponseStatus(e));
+      TracingUtil.addAttributesToCurrentSpan(OzoneTracingAttributes.STATUS, 
response.getStatus().name());

Review Comment:
   here we add the status attribute for failed responses, any reason why we've 
dropped this from 
StorageContainerLocationProtocolServerSideTranslatorPB.processRequest? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to