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

Exception thrown by custom QueryHandler constructor is ignored

    XMLWordPrintableJSON

Details

    • Correctness
    • Low
    • Low Hanging Fruit
    • User Report
    • All
    • Hide

      Started cassandra with invalid custom query handler, verified it fails and dies

      Started cassandra with valid custom query handler, verified it started up and info log appeared

      Show
      Started cassandra with invalid custom query handler, verified it fails and dies Started cassandra with valid custom query handler, verified it started up and info log appeared

    Description

      When a exception is thrown during the instantiation of the cassandra.custom_query_handler_class, depending on the exception thrown cassandra will simply log an info message and proceed with the bootstraping with the standard QueryHandler as a fallback measure: https://github.com/apache/cassandra/blob/cassandra-3.11.10/src/java/org/apache/cassandra/service/ClientState.java#L107

      The end-user will never know if the custom QueryHandler is actually registered or not, unless he notices the info message on the logs.

      Ideally, the message should be logged as error and JVM should stop as it cannot proceed according with the user expected configuration.

      Scenario:

      In our scenario, we have a custom QueryHandler that receives specific configuration, and we throw a ConfigurationException at instantiation time in case of any invalid config value. It is expected that cassandra stop the bootstraping instead of skipping the QH.

      Attachments

        1. 16703-trunk.txt
          1 kB
          Zoltan Ersek

        Activity

          People

            zoltanersek Zoltan Ersek
            efrasio Francisco Bento
            Zoltan Ersek
            Benjamin Lerer, Brandon Williams, Francisco Bento
            Votes:
            0 Vote for this issue
            Watchers:
            4 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 20m
                1h 20m