Shilun Fan created RATIS-2512:
---------------------------------
Summary: Fix unreleased zero-copy messages during gRPC service
shutdown
Key: RATIS-2512
URL: https://issues.apache.org/jira/browse/RATIS-2512
Project: Ratis
Issue Type: Sub-task
Components: gRPC
Reporter: Shilun Fan
Assignee: Shilun Fan
When running the gRPC zero-copy test:
{code:java}
./mvnw -pl ratis-test -am -Pgrpc-tests
-Dtest=TestRaftAsyncWithGrpc#testWithLoadAsync test {code}
the test may fail during cluster shutdown:
{code:java}
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 48.913
s <<< FAILURE! - in org.apache.ratis.grpc.TestRaftAsyncWithGrpc[ERROR]
org.apache.ratis.grpc.TestRaftAsyncWithGrpc.testWithLoadAsync Time elapsed:
48.785 s <<< FAILURE!org.opentest4j.AssertionFailedError: Unreleased zero copy
messages: please check logs to find the leaks. ==> expected: <1389> but was:
<676>
......{code}
The issue is that ZeroCopyMessageMarshaller may still hold unfinished zero-copy
request streams during service shutdown, but closing these streams does not
trigger the release logic for the corresponding messages. This causes the
request/release counts in ZeroCopyMetrics to become inconsistent.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)