gerlowskija commented on code in PR #48:
URL: https://github.com/apache/solr-sandbox/pull/48#discussion_r992391682


##########
crossdc-producer/src/test/java/org/apache/solr/crossdc/SolrAndKafkaIntegrationTest.java:
##########
@@ -245,6 +246,25 @@ public void testMirroringUpdateProcessor() throws 
Exception {
     assertClusterEventuallyHasDocs(cluster1Client, ALT_COLLECTION, "*:*", 2);
     assertCluster2EventuallyHasDocs(ALT_COLLECTION, normalDocQuery, 1);
     assertCluster2EventuallyHasDocs(ALT_COLLECTION, "*:*", 1);
+
+    // Index batch of docs that will exceed the max mirroring batch size 
cumulatively (but not individually)
+    // Batch consists of 100 docs each roughly 1/100th of the max-batch-size
+    docsToIndex.clear();
+    for (int i = 0; i < 100; i++) {
+      final SolrInputDocument doc = new SolrInputDocument();
+      doc.addField("id", "cumulativelyTooLarge-" + System.currentTimeMillis() 
+ "-" + i);
+      doc.addField("cumulativelyTooLarge_b", "true");
+      doc.addField("text", new String(new byte[MAX_MIRROR_BATCH_SIZE_BYTES / 
100]));
+      docsToIndex.add(doc);
+    }
+    cluster1Client.add(ALT_COLLECTION, docsToIndex);
+    cluster1Client.commit(ALT_COLLECTION);
+
+    final String cumulativelyTooLargeQuery = "cumulativelyTooLarge_b:true";
+    // Primary (but not secondary) should have 5 additional docs
+    assertClusterEventuallyHasDocs(cluster1Client, ALT_COLLECTION, 
cumulativelyTooLargeQuery, 100);
+    assertCluster2EventuallyHasDocs(ALT_COLLECTION, cumulativelyTooLargeQuery, 
0);
+    assertCluster2EventuallyHasDocs(ALT_COLLECTION, cumulativelyTooLargeQuery, 
0);

Review Comment:
   Done, good catch.  Copy/paste error from above.



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

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to