You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sam Lightfoot (Jira)" <ji...@apache.org> on 2025/06/07 10:42:00 UTC
[jira] [Commented] (CASSANDRA-20677) Adopt Unsafe::invokeCleaner for Direct ByteBuffer cleaning
[ https://issues.apache.org/jira/browse/CASSANDRA-20677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17956712#comment-17956712 ]
Sam Lightfoot commented on CASSANDRA-20677:
-------------------------------------------
[~stefan.miklosovic] - org.apache.cassandra.distributed.test.SSTableLoaderEncryptionOptionsTest#bulkLoaderSuccessfullyStreamsOverSslWithDeprecatedSslStoragePort is failing on this assertion
{code:java}
assertTrue(tool.getStdout().contains("ssl storage port is deprecated and not used")); {code}
In the code I see this is does not go via stdout but via a logger, causing the assertion to fail.
{code:java}
logger.info("ssl storage port is deprecated and not used, all communication goes though storage port " +
"which is able to handle encrypted communication too."); {code}
If I amend the above to
{code:java}
System.out.println("ssl storage port is deprecated and not used, all communication goes though storage port " +
"which is able to handle encrypted communication too."); {code}
The test passes.
I can't figure why this would start to fail now, unless it has been in the past. Let me know what you want to do.
> Adopt Unsafe::invokeCleaner for Direct ByteBuffer cleaning
> ----------------------------------------------------------
>
> Key: CASSANDRA-20677
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20677
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Local/Other
> Reporter: Sam Lightfoot
> Assignee: Sam Lightfoot
> Priority: Normal
> Fix For: 5.0.x, 5.x
>
>
> Per comments in FileUtils::clean
> {code:java}
> // TODO Once we can get rid of Java 8, it's simpler to call sun.misc.Unsafe.invokeCleaner(ByteBuffer),
> // but need to take care of the attachment handling (i.e. whether 'buf' is a duplicate or slice) - that
> // is different in sun.misc.Unsafe.invokeCleaner and this implementation. {code}
> We can now use Unsafe.invokeCleaner to clean direct byte buffers which should tidy up the existing code.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org