praveenc7 opened a new pull request, #16379:
URL: https://github.com/apache/pinot/pull/16379

   ## Summary
   
   To emit segment download metrics even when the segment is served from local 
storage (e.g., NFS or GPFS mount points).
   
   Previously, download metrics  were only emitted when the segment was fetched 
from remote deep storage. However, in environments where segments are accessed 
over mounted distributed filesystems, local access may still incur I/O latency 
and should be observable.
   
   Using `builder.entity(segmentFile) `registers the file with the JAX-RS 
response builder, but the actual streaming is handled internally by Jersey. 
This means we have no control over the output stream lifecycle and cannot 
accurately emit metrics after the download completes. To address this, we 
replaced it with a StreamingOutput wrapper that explicitly controls the file 
transfer and ensures download duration and size metrics are recorded once the 
file is fully sent to the client.
   
   
   


-- 
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