hani-fouladgar opened a new pull request, #11295:
URL: https://github.com/apache/ozone/pull/11295

   ## What changes were proposed in this pull request?
   
   Follower SCMs and Recon download the leader SCM's RocksDB checkpoint over a 
single, long-lived Inter-SCM gRPC connection. Today the only tunable is the 
client call deadline (`ozone.scm.ha.grpc.deadline.interval`); neither the 
client channel nor the server sets any keepalive, and the server's 
max-connection-idle is effectively infinite. As a result, an idle, ping-less 
connection can be silently dropped by an intermediary (firewall, proxy, or load 
balancer) during a transfer, and operators cannot align Inter-SCM gRPC behavior 
with their environment without code changes. 
   
   This PR adds operator-tunable keepalive and idle settings under the existing 
`ozone.scm.ha.grpc.*` prefix, wired onto both the client channel 
(`InterSCMGrpcClient`) and the server (`InterSCMGrpcProtocolService`): 
   
   - Client: `keepalive.time` (5m), `keepalive.timeout` (30s)
   - Server: `max.connection.idle` (15m), `keepalive.time` (5m), 
`keepalive.timeout` (30s), `permit.keepalive.time` (5m), 
`permit.keepalive.without.calls` (true)   
   
   Defaults are chosen to match the existing datanode gRPC server 
(XceiverServerGrpc), so Inter-SCM gRPC becomes consistent with the rest of the 
codebase. The server's permit.* settings are included so the client's pings are 
accepted rather than rejected with a GOAWAY. Note that maxConnectionIdle only 
applies when no RPC is active, so it does not abort an in-progress checkpoint 
download (which holds an active stream). All new keys are documented in 
ozone-default.xml. 
   
   This changes default runtime behavior on upgrade (keepalive is now enabled 
by default), which is called out for release notes. 
   
   **What is the link to the Apache JIRA**  
   https://issues.apache.org/jira/browse/HDDS-16418                             
                                                                                
                                                                                
                                                                                
      
   
   **How was this patch tested?** 
   
   New unit tests in hdds-server-scm:                                           
                                                                                
                                                                                
                                                                                
      
   - TestInterSCMGrpcClient#testDownloadIsAbortedAtDeadlineWithCustomKeepAlive 
— verifies a stuck download is still aborted at the configured deadline when 
custom keepalive values are set.
   - 
TestInterSCMGrpcProtocolService#testDownloadSucceedsWithCustomGrpcKeepAlive — 
end-to-end: a checkpoint downloads successfully with custom keepalive/idle 
applied on both client and server.
   
   Also verified TestOzoneConfigurationFields passes (new keys are in sync with 
ozone-default.xml) and checkstyle is clean.


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