[Ml Data Frame] Size the GET stats search by number of Ids requested (#43206)
Set the size of the search request to the number of ids limited by 10,000
This commit is contained in:
parent
5035454613
commit
e1f761dfc7
|
@ -341,6 +341,7 @@ public class DataFrameTransformsConfigManager {
|
|||
SearchRequest searchRequest = client.prepareSearch(DataFrameInternalIndex.INDEX_NAME)
|
||||
.addSort(DataFrameField.ID.getPreferredName(), SortOrder.ASC)
|
||||
.setQuery(builder)
|
||||
.setSize(Math.min(transformIds.size(), 10_000))
|
||||
.request();
|
||||
|
||||
executeAsyncWithOrigin(client.threadPool().getThreadContext(), DATA_FRAME_ORIGIN, searchRequest,
|
||||
|
|
|
@ -261,7 +261,7 @@ public class DataFrameTransformsConfigManagerTests extends DataFrameSingleNodeTe
|
|||
}
|
||||
|
||||
public void testGetStateAndStatsMultiple() throws InterruptedException {
|
||||
int numStats = randomInt(5);
|
||||
int numStats = randomIntBetween(10, 15);
|
||||
List<DataFrameTransformStateAndStats> expectedStats = new ArrayList<>();
|
||||
for (int i=0; i<numStats; i++) {
|
||||
DataFrameTransformStateAndStats stat =
|
||||
|
|
Loading…
Reference in New Issue