[
https://issues.apache.org/jira/browse/CASSANDRA-21657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Semb Wever updated CASSANDRA-21657:
-------------------------------------------
Fix Version/s: 6.0
5.0.10
6.0-alpha3
7.0
(was: 5.0.x)
(was: 7.x)
(was: 6.0.x)
Since Version: 3.0.0
Source Control Link:
https://github.com/apache/cassandra/commit/80fc814371eb969ab0a06aec5a6884071b20397b
Resolution: Fixed
Status: Resolved (was: Ready to Commit)
committed
https://github.com/apache/cassandra/commit/80fc814371eb969ab0a06aec5a6884071b20397b
> The hints write buffer is not released when the write executor shuts down
> -------------------------------------------------------------------------
>
> Key: CASSANDRA-21657
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21657
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Consistency/Hints
> Reporter: Michael Semb Wever
> Assignee: Michael Semb Wever
> Priority: Normal
> Fix For: 5.0.10, 6.0, 6.0-alpha3, 7.0
>
> Attachments:
> ci_summary_thelastpickle_mck-CASSANDRA-21657-5.0_22.html,
> ci_summary_thelastpickle_mck-CASSANDRA-21657-6.0_22.html,
> ci_summary_thelastpickle_mck-CASSANDRA-21657-trunk_25.html,
> results_details_thelastpickle_mck-CASSANDRA-21657-5.0_22.tar.xz,
> results_details_thelastpickle_mck-CASSANDRA-21657-6.0_22.tar.xz,
> results_details_thelastpickle_mck-CASSANDRA-21657-trunk_25.tar.xz
>
>
> {{HintsWriteExecutor}} allocates a 256 KiB direct buffer that every write
> task shares:
> {code:java}
> writeBuffer = ByteBuffer.allocateDirect(WRITE_BUFFER_SIZE);
> {code}
> {{shutdownBlocking}} shuts the executor down and leaves the buffer allocated.
> A process that shuts the hints service down and starts it again loses 256 KiB
> of direct memory each time. The in-JVM test framework does exactly that, once
> per instance restart, so a long dtest run holds direct memory that no
> instance can use.
> A node shutdown in production ends the process, so the priority is Low; the
> cost falls on the test framework and on any other caller that restarts the
> service in one process.
> The patch releases the buffer with {{FileUtils.clean}} after the executor
> terminates. The release waits for termination, because a write task that
> still runs holds the buffer, and a shutdown that gives up after its minute
> reports the buffer it keeps rather than freeing memory a task may write to.
> Patch:
> [mck/CASSANDRA-21657/5.0|https://github.com/thelastpickle/cassandra/tree/mck/CASSANDRA-21657/5.0]
> Provenance:
> [00003d27fa|https://github.com/datastax/cassandra/commit/00003d27faf2241245436d9440d740e1cd18aaa8]
> by [~jlewandowski]. That commit releases the buffer in a {{finally}} block
> and carries further work on the buffer pool and on the in-JVM instance
> shutdown, which this patch leaves out. The {{finally}} block frees the buffer
> even when a write task is still running, so this patch tests the termination
> result instead, and adds the regression test the commit lacks.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]