You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/06/09 16:09:15 UTC

[GitHub] [cassandra] jasonstack commented on a change in pull request #606: Cassandra 15752 trunk

jasonstack commented on a change in pull request #606:
URL: https://github.com/apache/cassandra/pull/606#discussion_r437370196



##########
File path: src/java/org/apache/cassandra/locator/ReplicaPlan.java
##########
@@ -106,18 +106,25 @@ ForTokenRead withContact(EndpointsForToken newContact)
     public static class ForRangeRead extends ForRead<EndpointsForRange>
     {
         final AbstractBounds<PartitionPosition> range;
+        final int rangeCount;
 
-        public ForRangeRead(Keyspace keyspace, ConsistencyLevel consistencyLevel, AbstractBounds<PartitionPosition> range, EndpointsForRange candidates, EndpointsForRange contact)
+        public ForRangeRead(Keyspace keyspace, ConsistencyLevel consistencyLevel, AbstractBounds<PartitionPosition> range, EndpointsForRange candidates, EndpointsForRange contact, int rangeCount)

Review comment:
       +1

##########
File path: src/java/org/apache/cassandra/locator/ReplicaPlan.java
##########
@@ -106,18 +106,25 @@ ForTokenRead withContact(EndpointsForToken newContact)
     public static class ForRangeRead extends ForRead<EndpointsForRange>
     {
         final AbstractBounds<PartitionPosition> range;
+        final int rangeCount;
 
-        public ForRangeRead(Keyspace keyspace, ConsistencyLevel consistencyLevel, AbstractBounds<PartitionPosition> range, EndpointsForRange candidates, EndpointsForRange contact)
+        public ForRangeRead(Keyspace keyspace, ConsistencyLevel consistencyLevel, AbstractBounds<PartitionPosition> range, EndpointsForRange candidates, EndpointsForRange contact, int rangeCount)
         {
             super(keyspace, consistencyLevel, candidates, contact);
             this.range = range;
+            this.rangeCount = rangeCount;
         }
 
         public AbstractBounds<PartitionPosition> range() { return range; }
 
+        /**
+         * @return number of vnode ranges

Review comment:
       good idea. updated the javadoc and method name to `vnodeCount`

##########
File path: src/java/org/apache/cassandra/service/StorageProxy.java
##########
@@ -2100,22 +2112,33 @@ public RowIterator computeNext()
             }
         }
 
-        private void updateConcurrencyFactor()
+        @VisibleForTesting
+        public void handleBatchCompleted()

Review comment:
       renamed back to `updateConcurrencyFactor `

##########
File path: src/java/org/apache/cassandra/service/StorageProxy.java
##########
@@ -2041,16 +2052,18 @@ public void close()
         private DataLimits.Counter counter;
         private PartitionIterator sentQueryIterator;
 
+        private int maxConcurrencyFactor;
         private int concurrencyFactor;
         // The two following "metric" are maintained to improve the concurrencyFactor
         // when it was not good enough initially.
         private int liveReturned;
         private int rangesQueried;
 
-        public RangeCommandIterator(RangeIterator ranges, PartitionRangeReadCommand command, int concurrencyFactor, Keyspace keyspace, ConsistencyLevel consistency, long queryStartNanoTime)
+        public RangeCommandIterator(RangeIterator ranges, PartitionRangeReadCommand command, int concurrencyFactor, int maxConcurrencyFactor, Keyspace keyspace, ConsistencyLevel consistency, long queryStartNanoTime)

Review comment:
       +1

##########
File path: test/unit/org/apache/cassandra/service/reads/repair/AbstractReadRepairTest.java
##########
@@ -294,7 +294,7 @@ public void setUp()
     static ReplicaPlan.ForRangeRead replicaPlan(Keyspace keyspace, ConsistencyLevel consistencyLevel, EndpointsForRange replicas, EndpointsForRange targets)
     {
         return new ReplicaPlan.ForRangeRead(keyspace, consistencyLevel,
-                ReplicaUtils.FULL_BOUNDS, replicas, targets);
+                ReplicaUtils.FULL_BOUNDS, replicas, targets, 1);

Review comment:
       +1




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org