You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Lyuben Todorov (JIRA)" <ji...@apache.org> on 2014/05/25 12:51:01 UTC

[jira] [Created] (CASSANDRA-7300) BatchlogManager#countAllBatches doesn't swap strings for the count query.

Lyuben Todorov created CASSANDRA-7300:
-----------------------------------------

             Summary: BatchlogManager#countAllBatches doesn't swap strings for the count query.
                 Key: CASSANDRA-7300
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7300
             Project: Cassandra
          Issue Type: Bug
            Reporter: Lyuben Todorov
            Assignee: Lyuben Todorov
            Priority: Trivial
             Fix For: 2.1 rc1
         Attachments: trunk-batchlog-counting.txt

{{BatchlogManager#countAllBatches}} doesn't actually swap strings for the query and so yields an Error in the {{BatchLogManager}} unit test:
{noformat}
    [junit] Testcase: testReplay(org.apache.cassandra.db.BatchlogManagerTest):	Caused an ERROR
    [junit] Error validating SELECT count(*) FROM %s.%s
    [junit] java.lang.RuntimeException: Error validating SELECT count(*) FROM %s.%s
    [junit] 	at org.apache.cassandra.cql3.QueryProcessor.executeInternal(QueryProcessor.java:274)
    [junit] 	at org.apache.cassandra.db.BatchlogManager.countAllBatches(BatchlogManager.java:102)
    [junit] 	at org.apache.cassandra.db.BatchlogManagerTest.testReplay(BatchlogManagerTest.java:60)
    [junit] Caused by: org.apache.cassandra.exceptions.SyntaxException: line 1:24 no viable alternative at character '%'
{noformat}

 Attaching patch that uses a formatted string to replace the %s with the actual ks.cf pair.



--
This message was sent by Atlassian JIRA
(v6.2#6252)