[ 
https://issues.apache.org/jira/browse/CASSANDRA-19812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874128#comment-17874128
 ] 

Stefan Miklosovic commented on CASSANDRA-19812:
-----------------------------------------------

[CASSANDRA-19812-5.0|https://github.com/instaclustr/cassandra/tree/CASSANDRA-19812-5.0]
{noformat}
java11_pre-commit_tests                         
  ✓ j11_build                                        3m 46s
  ✓ j11_cqlsh_dtests_py311                           8m 22s
  ✓ j11_cqlsh_dtests_py311_vnode                     9m 48s
  ✓ j11_cqlsh_dtests_py38                            9m 43s
  ✓ j11_cqlsh_dtests_py38_vnode                      6m 29s
  ✓ j11_cqlshlib_cython_tests                        8m 38s
  ✓ j11_cqlshlib_tests                              10m 21s
  ✓ j11_dtests                                      37m 55s
  ✓ j11_dtests_vnode                                34m 27s
  ✓ j11_jvm_dtests                                  23m 31s
  ✓ j11_jvm_dtests_latest_vnode                     16m 13s
  ✓ j11_simulator_dtests                             4m 59s
  ✓ j11_unit_tests                                  15m 32s
  ✓ j11_unit_tests_repeat                            6m 54s
  ✓ j11_utests_latest                                16m 3s
  ✓ j11_utests_latest_repeat                         7m 50s
  ✓ j11_utests_oa                                   14m 59s
  ✓ j11_utests_oa_repeat                             4m 10s
  ✓ j11_utests_system_keyspace_directory            17m 14s
  ✓ j11_utests_system_keyspace_directory_repeat      7m 30s
  ✓ j17_cqlsh_dtests_py311                           6m 17s
  ✓ j17_cqlsh_dtests_py311_vnode                     6m 27s
  ✓ j17_cqlsh_dtests_py38                             6m 0s
  ✓ j17_cqlsh_dtests_py38_vnode                      6m 49s
  ✓ j17_cqlshlib_cython_tests                         8m 5s
  ✓ j17_cqlshlib_tests                                9m 7s
  ✓ j17_dtests                                       33m 6s
  ✓ j17_dtests_vnode                                32m 13s
  ✓ j17_jvm_dtests                                  23m 21s
  ✓ j17_jvm_dtests_latest_vnode                     14m 22s
  ✓ j17_unit_tests                                   15m 1s
  ✓ j17_unit_tests_repeat                             4m 3s
  ✓ j17_utests_latest                                15m 0s
  ✓ j17_utests_latest_repeat                          4m 7s
  ✓ j17_utests_oa                                   14m 23s
  ✓ j17_utests_oa_repeat                             6m 13s
  ✕ j11_dtests_latest                               39m 46s
      bootstrap_test.TestBootstrap test_read_from_bootstrapped_node
      bootstrap_test.TestBootstrap test_shutdown_wiped_node_cannot_join
  ✕ j17_dtests_latest                               34m 28s
      bootstrap_test.TestBootstrap test_killed_wiped_node_cannot_join
{noformat}

[java11_pre-commit_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/4616/workflows/f11e66c9-a248-4366-854e-0a1d86759d13]


> 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.x, 5.x
>
>
> 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]

Reply via email to