[ 
https://issues.apache.org/jira/browse/RATIS-2406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz-wo Sze updated RATIS-2406:
------------------------------
    Component/s: gRPC

> Fix resource cleanup bug in GrpcServicesImpl.closeImpl() method
> ---------------------------------------------------------------
>
>                 Key: RATIS-2406
>                 URL: https://issues.apache.org/jira/browse/RATIS-2406
>             Project: Ratis
>          Issue Type: Bug
>          Components: gRPC
>            Reporter: Shilun Fan
>            Assignee: Shilun Fan
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> ## Description
> There is a bug in the `GrpcServicesImpl.closeImpl()` method where 
> `super.closeImpl()` is called inside the server shutdown loop, leading to:
> 1. **Multiple invocations**: The parent class cleanup logic is executed 
> multiple times (once per server)
> 2. **Resource leak risk**: If any server shutdown fails with an exception, 
> `super.closeImpl()`, `serverInterceptor.close()`, and 
> `ConcurrentUtils.shutdownAndWait(executor)` won't be executed



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to