[ 
https://issues.apache.org/jira/browse/CASSANDRA-18820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacek Lewandowski updated CASSANDRA-18820:
------------------------------------------
    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:
{noformat}
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)
{noformat}

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


  was:
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.



> Source location is lost when an exception is thrown from the coordinator in 
> in-jvm dtests
> -----------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-18820
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18820
>             Project: Cassandra
>          Issue Type: Task
>          Components: Test/dtest/java
>            Reporter: Jacek Lewandowski
>            Assignee: Jacek Lewandowski
>            Priority: Normal
>
> 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:
> {noformat}
> 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)
> {noformat}
> It does not provide any information on which line in the {{BooleanTest.java}} 
> caused the problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to