Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void testMaxDocsLimit() throws Exception {
assertThat(indexingResult.numFailures, equalTo(rejectedRequests));
assertThat(indexingResult.numSuccess, equalTo(0));
final IllegalArgumentException deleteError = expectThrows(IllegalArgumentException.class, client().prepareDelete("test", "any-id"));
assertThat(deleteError.getMessage(), containsString("Number of documents in the index can't exceed [" + maxDocs.get() + "]"));
assertThat(deleteError.getMessage(), containsString("Number of documents in the shard cannot exceed [" + maxDocs.get() + "]"));
indicesAdmin().prepareRefresh("test").get();
assertNoFailuresAndResponse(
prepareSearch("test").setQuery(new MatchAllQueryBuilder()).setTrackTotalHitsUpTo(Integer.MAX_VALUE).setSize(0),
Expand Down Expand Up @@ -162,7 +162,7 @@ static IndexingResult indexDocs(int numRequests, int numThreads) throws Exceptio
assertThat(resp.status(), equalTo(RestStatus.CREATED));
} catch (IllegalArgumentException e) {
numFailure.incrementAndGet();
assertThat(e.getMessage(), containsString("Number of documents in the index can't exceed [" + maxDocs.get() + "]"));
assertThat(e.getMessage(), containsString("Number of documents in the shard cannot exceed [" + maxDocs.get() + "]"));
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,7 @@ private Exception tryAcquireInFlightDocs(Operation operation, int addingDocs) {
final long totalDocs = indexWriter.getPendingNumDocs() + inFlightDocCount.addAndGet(addingDocs);
if (totalDocs > maxDocs) {
releaseInFlightDocs(addingDocs);
return new IllegalArgumentException("Number of documents in the index can't exceed [" + maxDocs + "]");
return new IllegalArgumentException("Number of documents in the shard cannot exceed [" + maxDocs + "]");
} else {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7417,7 +7417,7 @@ public void testMaxDocsOnPrimary() throws Exception {
assertNotNull(result.getFailure());
assertThat(
result.getFailure().getMessage(),
containsString("Number of documents in the index can't exceed [" + maxDocs + "]")
containsString("Number of documents in the shard cannot exceed [" + maxDocs + "]")
);
assertThat(result.getSeqNo(), equalTo(UNASSIGNED_SEQ_NO));
assertThat(engine.getLocalCheckpointTracker().getMaxSeqNo(), equalTo(maxSeqNo));
Expand Down