-
Notifications
You must be signed in to change notification settings - Fork 25.6k
NPE on batched query execution when the request is part of PIT with alias filters #128552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 13 commits
b52cb4d
cd91f68
5f4eba9
3b64685
ec6c86b
ec1d9fc
8c8698e
fd2887d
ab167b3
9a190e1
927ca98
0b08043
1dbad2b
ccb75a0
0b7b3ed
6296ad2
93d6c4b
1fad802
ef4d836
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 128552 | ||
summary: Fix - NPE on batched query execution when the request is part of PIT with alias filters | ||
area: Search | ||
type: bug | ||
issues: [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
import org.elasticsearch.ExceptionsHelper; | ||
import org.elasticsearch.action.NoShardAvailableActionException; | ||
import org.elasticsearch.action.admin.cluster.reroute.ClusterRerouteUtils; | ||
import org.elasticsearch.action.admin.indices.alias.Alias; | ||
import org.elasticsearch.action.admin.indices.stats.CommonStats; | ||
import org.elasticsearch.action.admin.indices.stats.ShardStats; | ||
import org.elasticsearch.action.support.IndicesOptions; | ||
|
@@ -126,6 +127,28 @@ public void testBasic() { | |
} | ||
} | ||
|
||
public void testIndexWithAlias() { | ||
String indexName = "index_1"; | ||
String alias = "alias_1"; | ||
assertAcked(indicesAdmin().prepareCreate(indexName).setSettings(indexSettings(10, 0)).addAlias(new Alias(alias))); | ||
|
||
int numDocs = randomIntBetween(50, 150); | ||
for (int i = 0; i < numDocs; i++) { | ||
String id = Integer.toString(i); | ||
prepareIndex(indexName).setId(id).setSource("value", i).get(); | ||
} | ||
refresh(indexName); | ||
BytesReference pitId = openPointInTime(new String[] { alias }, TimeValue.timeValueMinutes(1)).getPointInTimeId(); | ||
; | ||
javanna marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
try { | ||
assertResponse(prepareSearch().setPointInTime(new PointInTimeBuilder(pitId)), resp1 -> { | ||
assertThat(resp1.pointInTimeId(), equalTo(pitId)); | ||
assertHitCount(resp1, numDocs); | ||
}); | ||
} finally { | ||
closePointInTime(pitId); | ||
} | ||
} | ||
|
||
public void testMultipleIndices() { | ||
int numIndices = randomIntBetween(1, 5); | ||
for (int i = 1; i <= numIndices; i++) { | ||
|
Uh oh!
There was an error while loading. Please reload this page.