This is an automated email from the ASF dual-hosted git repository. marcuse pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit 1d9793eff967a62ccde3796d9a1e5a9f8881e141 Merge: e191aff 9d7eeb5 Author: Marcus Eriksson <[email protected]> AuthorDate: Mon Mar 25 09:08:12 2019 +0100 Merge branch 'cassandra-3.11' into trunk CHANGES.txt | 1 + .../partitions/UnfilteredPartitionIterators.java | 9 +++---- .../test/DistributedReadWritePathTest.java | 30 ++++++++++++++++++++++ 3 files changed, 35 insertions(+), 5 deletions(-) diff --cc src/java/org/apache/cassandra/db/partitions/UnfilteredPartitionIterators.java index 24c4d4a,757143f..7990474 --- a/src/java/org/apache/cassandra/db/partitions/UnfilteredPartitionIterators.java +++ b/src/java/org/apache/cassandra/db/partitions/UnfilteredPartitionIterators.java @@@ -256,20 -246,21 +256,19 @@@ public abstract class UnfilteredPartiti /** * Digests the the provided iterator. * + * Caller must close the provided iterator. + * - * @param command the command that has yield {@code iterator}. This can be null if {@code version >= MessagingService.VERSION_30} - * as this is only used when producing digest to be sent to legacy nodes. * @param iterator the iterator to digest. - * @param digest the {@code MessageDigest} to use for the digest. + * @param hasher the {@link Hasher} to use for the digest. * @param version the messaging protocol to use when producing the digest. */ - public static void digest(ReadCommand command, UnfilteredPartitionIterator iterator, MessageDigest digest, int version) + public static void digest(UnfilteredPartitionIterator iterator, Hasher hasher, int version) { - try (UnfilteredPartitionIterator iter = iterator) + while (iterator.hasNext()) { - while (iter.hasNext()) + try (UnfilteredRowIterator partition = iterator.next()) { - try (UnfilteredRowIterator partition = iter.next()) - { - UnfilteredRowIterators.digest(command, partition, digest, version); + UnfilteredRowIterators.digest(partition, hasher, version); - } } } } diff --cc test/distributed/org/apache/cassandra/distributed/test/DistributedReadWritePathTest.java index a61ef8e,238e9e7..b95f166 --- a/test/distributed/org/apache/cassandra/distributed/test/DistributedReadWritePathTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/DistributedReadWritePathTest.java @@@ -22,13 -22,14 +22,17 @@@ import org.junit.Assert import org.junit.Test; import org.apache.cassandra.db.ConsistencyLevel; + import org.apache.cassandra.db.Keyspace; import org.apache.cassandra.distributed.Cluster; + import org.apache.cassandra.distributed.impl.IInvokableInstance; + + import static org.junit.Assert.assertEquals; +import static org.apache.cassandra.net.MessagingService.Verb.READ_REPAIR; + public class DistributedReadWritePathTest extends DistributedTestBase { + @Test public void coordinatorReadTest() throws Throwable { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
