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/07/21 22:34:10 UTC

[GitHub] [cassandra] maedhroz commented on a change in pull request #642: Cassandra 15861 lock trunk

maedhroz commented on a change in pull request #642:
URL: https://github.com/apache/cassandra/pull/642#discussion_r458427678



##########
File path: test/unit/org/apache/cassandra/db/streaming/CassandraEntireSSTableStreamWriterTest.java
##########
@@ -126,43 +152,98 @@ public void testBlockWriterOverWire() throws IOException
     @Test
     public void testBlockReadingAndWritingOverWire() throws Exception
     {
-        StreamSession session = setupStreamingSessionForTest();
-        InetAddressAndPort peer = FBUtilities.getBroadcastAddressAndPort();
+        testBlockReadingAndWritingOverWire(null);
+    }
+
+    /**
+     * Entire-sstable-streaming receiver will throw checksum validation failure because concurrent stats metadata
+     * update causes the actual transfered file size to be different from the one in {@link ComponentManifest}
+     */
+    @Test
+    public void testBlockReadingAndWritingOverWireWithStatsMutation() throws Exception
+    {
+        testBlockReadingAndWritingOverWire(() -> {
+            sstable.mutateAndReloadStats(stats -> stats.mutateRepairedMetadata(0, UUID.randomUUID(), false));
+            return null;
+        });
+    }
+
+    /**
+     * Entire-sstable-streaming receiver will throw checksum validation failure because concurrent index summary
+     * redistribution task will modify index summary causing actual transfered index summary size to be different from
+     * the one in {@link ComponentManifest}
+     */
+    @Test
+    public void testBlockReadingAndWritingOverWireWithIndexSummaryRedistribution() throws Exception
+    {
+        testBlockReadingAndWritingOverWire(() -> {
+
+            long nonRedistributingOffHeapSize = 0;
+            long memoryPoolBytes = 1024 * 1024;
+
+            // rewrite index summary file with new min/max index interval
+            TableMetadata origin = store.metadata();
+            MigrationManager.announceTableUpdate(origin.unbuild().minIndexInterval(1).maxIndexInterval(2).build(), true);
+
+            try (LifecycleTransaction txn = store.getTracker().tryModify(asList(sstable), OperationType.UNKNOWN))

Review comment:
       Should `UNKNOWN` be `INDEX_SUMMARY`?




----------------------------------------------------------------
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