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

Source location is lost when an exception is thrown from the coordinator in in-jvm dtests

    XMLWordPrintableJSON

Details

    • Task
    • Status: Patch Available
    • Normal
    • Resolution: Unresolved
    • None
    • Test/dtest/java
    • None
    • Code Clarity
    • Low Hanging Fruit
    • All
    • None
    • Hide

      manual test

      Show
      manual test

    Description

      The mechanism is simple - currently we only throw the cause and the enclosing stacktrace is dropped. Therefore, it is usually difficult to locate which test line is responsible for throwing the exception.

      For example, an induced error caused by an invalid query in BooleanTest yields the following message:

      org.apache.cassandra.exceptions.InvalidRequestException: Undefined column name dk in table distributed_test_keyspace.tbl
      	at org.apache.cassandra.schema.TableMetadata.getExistingColumn(TableMetadata.java:402)
      	at org.apache.cassandra.cql3.SingleColumnRelation.newEQRestriction(SingleColumnRelation.java:184)
      	at org.apache.cassandra.cql3.Relation.toRestriction(Relation.java:143)
      	at org.apache.cassandra.cql3.restrictions.StatementRestrictions.<init>(StatementRestrictions.java:205)
      	at org.apache.cassandra.cql3.restrictions.StatementRestrictions.<init>(StatementRestrictions.java:145)
      	at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepareRestrictions(SelectStatement.java:1276)
      	at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:1136)
      	at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:1126)
      	at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:1098)
      	at org.apache.cassandra.cql3.QueryProcessor.getStatement(QueryProcessor.java:857)
      	at org.apache.cassandra.distributed.impl.Coordinator.unsafeExecuteInternal(Coordinator.java:109)
      	at org.apache.cassandra.distributed.impl.Coordinator.unsafeExecuteInternal(Coordinator.java:103)
      	at org.apache.cassandra.distributed.impl.Coordinator.lambda$executeWithResult$0(Coordinator.java:66)
      	at org.apache.cassandra.concurrent.FutureTask.call(FutureTask.java:61)
      	at org.apache.cassandra.concurrent.FutureTask.run(FutureTask.java:71)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      

      It does not provide any information on which line in the BooleanTest.java caused the problem.

      Attachments

        Issue Links

          Activity

            People

              jlewandowski Jacek Lewandowski
              jlewandowski Jacek Lewandowski
              Jacek Lewandowski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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