Skip to content

Commit 10f82d2

Browse files
author
Harsh Garg
committed
Updating exception message in ShardPaginationStrategy
Signed-off-by: Harsh Garg <[email protected]>
1 parent dd9df05 commit 10f82d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/main/java/org/opensearch/action/pagination/ShardPaginationStrategy.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ private PageData getPageData(
113113
Map<Integer, IndexShardRoutingTable> indexShardRoutingTable = indicesRouting.get(indexName).getShards();
114114
for (; startShardId < indexShardRoutingTable.size(); startShardId++) {
115115
if (indexShardRoutingTable.get(startShardId).size() > numShardsRequired) {
116-
throw new IllegalArgumentException("size value should be greater than the replica count of all indices");
116+
throw new IllegalArgumentException(
117+
"size value should be greater than the replica count of all indices, so that all primary and replicas of a shard show up in single page"
118+
);
117119
}
118120
shardCount += indexShardRoutingTable.get(startShardId).size();
119121
if (shardCount > numShardsRequired) {

0 commit comments

Comments
 (0)