vigyasharma commented on code in PR #633:
URL: https://github.com/apache/lucene/pull/633#discussion_r862515847


##########
lucene/test-framework/src/java/org/apache/lucene/tests/index/MockRandomMergePolicy.java:
##########
@@ -86,6 +86,20 @@ public MergeSpecification findMerges(
     return mergeSpec;
   }
 
+  @Override
+  public MergeSpecification findMerges(CodecReader... readers) throws 
IOException {
+    if (random.nextBoolean() == true) {
+      return super.findMerges(readers);
+    } else {
+      // create a oneMerge for each reader to let them get concurrently 
processed by addIndexes()

Review Comment:
   > Please add a specific test only for concurrently merging addIndexes, but 
not make it the default for all uses of IndexWriter in unit tests.
   
   I have specific tests for this change - to test concurrent execution 
[[1]](https://github.com/apache/lucene/pull/633/files#diff-ce6b91c31190c4956eee8a734550af25047d33b92a71c3d7303eac4cc408c504R741),
 rollbacks and transactional behavior 
[[2]](https://github.com/apache/lucene/pull/633/files#diff-ce6b91c31190c4956eee8a734550af25047d33b92a71c3d7303eac4cc408c504R790),
 boundary conditions 
[[3]](https://github.com/apache/lucene/pull/633/files#diff-ce6b91c31190c4956eee8a734550af25047d33b92a71c3d7303eac4cc408c504R820),
 
[[4]](https://github.com/apache/lucene/pull/633/files#diff-ce6b91c31190c4956eee8a734550af25047d33b92a71c3d7303eac4cc408c504R838),
 
[[5]](https://github.com/apache/lucene/pull/633/files#diff-ce6b91c31190c4956eee8a734550af25047d33b92a71c3d7303eac4cc408c504R882),
 
[[6]](https://github.com/apache/lucene/pull/633/files#diff-ce6b91c31190c4956eee8a734550af25047d33b92a71c3d7303eac4cc408c504R926),
  triggering background merges 
[[7]](https://github.com/apache/lucene/pull/633/files#diff-
 ce6b91c31190c4956eee8a734550af25047d33b92a71c3d7303eac4cc408c504R917), and 
changes in concurrency tests that check for IW abort, rollback and competing 
concurrent operations 
[[8]](https://github.com/apache/lucene/pull/633/files#diff-ce6b91c31190c4956eee8a734550af25047d33b92a71c3d7303eac4cc408c504R993-R994).
 
   
   Would love to get your inputs on any other scenarios that I should test.



-- 
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...@lucene.apache.org

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


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

Reply via email to