[
https://issues.apache.org/jira/browse/CASSANDRA-19812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888685#comment-17888685
]
Michael Semb Wever commented on CASSANDRA-19812:
------------------------------------------------
test-compression has lots (130+) of failures in trunk.
- https://nightlies.apache.org/cassandra/Cassandra-trunk/1925/
- https://the-asf.slack.com/archives/CK23JSY2K/p1726927290726639
{noformat}
ConfigurationException: commitlog_disk_access_mode = mmap is not supported with
compression or encryption. Please use 'auto' when unsure.
{noformat}
To reproduce locally
{code}
# using jdk17
.build/run-tests.sh test-compression IndexGroupLifecycleTest
{code}
Or, since it is flakey (depending on the seed):
{code}
git cherry-pick -n cassandra-5.0..thelastpickle/mck/18942/5.0
.build/docker/run-tests.sh -a test-compression-repeat -t
IndexGroupLifecycleTest -j 17 -e REPEATED_TESTS_COUNT=500 -e
REPEATED_TESTS_STOP_ON_FAILURE=true
{code}
Fix PR:
https://github.com/apache/cassandra/compare/trunk...thelastpickle:cassandra:mck/19812-fix/trunk
> We should throw exception when commitlog 's DiskAccessMode is direct but
> direct io is not support
> -------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-19812
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19812
> Project: Cassandra
> Issue Type: Improvement
> Components: Local/Commit Log
> Reporter: Maxwell Guo
> Assignee: Maxwell Guo
> Priority: Normal
> Fix For: 5.0.1, 5.1
>
>
> Looking into the code below :
> {code:java}
> private static DiskAccessMode
> resolveCommitLogWriteDiskAccessMode(DiskAccessMode providedDiskAccessMode)
> {
> boolean compressOrEncrypt = getCommitLogCompression() != null ||
> (getEncryptionContext() != null && getEncryptionContext().isEnabled());
> boolean directIOSupported = false;
> try
> {
> directIOSupported = FileUtils.getBlockSize(new
> File(getCommitLogLocation())) > 0;
> }
> catch (RuntimeException e)
> {
> logger.warn("Unable to determine block size for commit log
> directory: {}", e.getMessage());
> }
> if (providedDiskAccessMode == DiskAccessMode.auto)
> {
> if (compressOrEncrypt)
> providedDiskAccessMode = DiskAccessMode.legacy;
> else
> {
> providedDiskAccessMode = directIOSupported &&
> conf.disk_optimization_strategy == Config.DiskOptimizationStrategy.ssd ?
> DiskAccessMode.direct
>
> :
> DiskAccessMode.legacy;
> }
> }
> if (providedDiskAccessMode == DiskAccessMode.legacy)
> {
> providedDiskAccessMode = compressOrEncrypt ?
> DiskAccessMode.standard : DiskAccessMode.mmap;
> }
> return providedDiskAccessMode;
> }
> {code}
> We should throw exception when user set the DiskAccessMode to direct for
> commitlog but the directIOSupported return false after the judgement of
> "FileUtils.getBlockSize(new File(getCommitLogLocation())) > 0;" instead of
> waiting for the system to start and accepting reads and writes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]