Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-19779

direct IO support is always evaluated to false upon the very first start of a node

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 5.0-rc2, 5.0.1, 5.1
    • Legacy/Tools
    • None

    Description

      When I extract the distribution tarball and I want to use tools in tools/bin, there is this warn log visible every time for tools when they are started (does not happen on "help" command, obviously)

      WARN  14:25:11,835 Unable to determine block size for commit log directory: null 

      This is because we introduced this (1) in CASSANDRA-18464

      What that does is that it will go and try to create a temporary file in commit log directory to get "block size" for a "file store" that file is in.

      The problem with that is that when we just extract a tarball and run the tools - Cassandra was never started - then such commit log directory does not exist yet, so it tries to create a temporary file in a non-existing directory, which fails, hence the log message.

      The fix is to check if commitlog dir exists and return / skip the resolution of block size if it does not.

      Another approach might be to check if this is executed in the context of a tool and skip it from resolution altogether. The problem with this is that not all tools we have in bin/log call DatabaseDescriptor.
      toolInitialization() so we might combine these two.
      (1) https://github.com/apache/cassandra/blob/cassandra-5.0/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1455-L1462

      Attachments

        Issue Links

          Activity

            People

              smiklosovic Stefan Miklosovic
              smiklosovic Stefan Miklosovic
              Stefan Miklosovic
              Branimir Lambov, Maxwell Guo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h