cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Ninja make public QP#processStatement/3
Date Mon, 20 Oct 2014 23:12:25 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 49833b943 -> 0be66837e


Ninja make public QP#processStatement/3


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/be3b3807
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/be3b3807
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/be3b3807

Branch: refs/heads/trunk
Commit: be3b3807e0681a405d0be83fd2c076bf3992f8e0
Parents: abde62d
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Tue Oct 21 02:09:37 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Oct 21 02:09:37 2014 +0300

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cql3/QueryProcessor.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/be3b3807/src/java/org/apache/cassandra/cql3/QueryProcessor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index 2818358..f0116e5 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -84,7 +84,8 @@ public class QueryProcessor implements QueryHandler
     // bother with expiration on those.
     private static final ConcurrentMap<String, ParsedStatement.Prepared> internalStatements
= new ConcurrentHashMap<>();
 
-    @VisibleForTesting
+    // Direct calls to processStatement do not increment the preparedStatementsExecuted/regularStatementsExecuted
+    // counters. Callers of processStatement are responsible for correctly notifying metrics
     public static final CQLMetrics metrics = new CQLMetrics();
 
     private static final AtomicInteger lastMinuteEvictionsCount = new AtomicInteger(0);
@@ -214,9 +215,7 @@ public class QueryProcessor implements QueryHandler
                                                             Cell.MAX_NAME_LENGTH));
     }
 
-    private static ResultMessage processStatement(CQLStatement statement,
-                                                  QueryState queryState,
-                                                  QueryOptions options)
+    public ResultMessage processStatement(CQLStatement statement, QueryState queryState,
QueryOptions options)
     throws RequestExecutionException, RequestValidationException
     {
         logger.trace("Process {} @CL.{}", statement, options.getConsistency());


Mime
View raw message