madrob commented on a change in pull request #744:
URL: https://github.com/apache/solr/pull/744#discussion_r830162764
##########
File path: solr/core/src/test/org/apache/solr/update/PeerSyncTest.java
##########
@@ -213,26 +214,23 @@ public void test() throws Exception {
// now lets check fingerprinting causes appropriate fails
v = 4000;
- add(client0, seenLeader, sdoc("id", Integer.toString((int) v),
"_version_", v));
+ add(client0, seenLeader, sdoc("id", Integer.toString(v), "_version_", v));
docsAdded.add(4000);
int toAdd = numVersions + 10;
- for (int i = 0; i < toAdd; i++) {
- add(
- client0,
- seenLeader,
- sdoc("id", Integer.toString((int) v + i + 1), "_version_", v + i +
1));
- add(
- client1,
- seenLeader,
- sdoc("id", Integer.toString((int) v + i + 1), "_version_", v + i +
1));
- docsAdded.add((int) v + i + 1);
+
+ List<SolrInputDocument> additionalDocs = new ArrayList<>(toAdd);
+ for (int i = v + 1; i < v + toAdd + 1; i++) {
+ additionalDocs.add(sdoc("id", Integer.toString(i), "_version_", i));
+ docsAdded.add(i);
}
+ add(client0, seenLeader, additionalDocs);
+ add(client1, seenLeader, additionalDocs);
Review comment:
Each replica is still indexing independently, so as long as the relative
order is the same it works out. i.e. `c0_1`, `c0_2`, `c1_1`, `c1_2` the
specific interleaving won't have any effect.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]