[
https://issues.apache.org/jira/browse/CASSANDRA-19812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888726#comment-17888726
]
Michael Semb Wever commented on CASSANDRA-19812:
------------------------------------------------
{quote}
- so i am cool with test/unit/org/apache/cassandra/utils/ConfigGenBuilder.java
if you remove prepare and move the logic into sanitze
- revert the change to test/unit/org/apache/cassandra/cql3/CQLTester.java
{quote}
I believe these are needed.
it won't work only doing {{sanitize}} before
{{YamlConfigurationLoader.updateFromMap(..)}} as `test-compression` loads from
file, i.e. not part of the fuzz. So the two methods {{prepare}} and
{{sanitize}} are needed separately – at least that's the most intuitive
solution i've found so far…
{quote}
how is it possible this didnt show up in circle's pre-commit tests, shouldnt we
add them there?
{quote}
you need to run the `test-compression` variation. currently this only runs on
the
`[post-commit|https://github.com/apache/cassandra/blob/trunk/.jenkins/Jenkinsfile#L132]`
profile, unless it's explicitly specified/triggered.
> 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]