xiaozaiyuji commented on code in PR #10557:
URL: https://github.com/apache/skywalking/pull/10557#discussion_r1141017807


##########
oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java:
##########
@@ -76,17 +78,19 @@ public MetadataQueryEsDAO(
         ElasticSearchClient client,
         StorageModuleElasticsearchConfig config) {
         super(client);
-        this.queryMaxSize = config.getMetadataQueryMaxSize();
+        this.metadataMaxSize = config.getMetadataQueryMaxSize();
+        this.resultWindowMaxSize = config.getResultWindowMaxSize();
         this.scrollingBatchSize = config.getScrollingBatchSize();
         this.layerSize = Layer.values().length;
+        this.queryMaxSize = Math.min(metadataMaxSize, resultWindowMaxSize);

Review Comment:
   I change this because this is also limit by the elasticsearch 
resultWindowMaxSize, if the metadataQueryMaxSize  setting by 20000 over the 
default limit by elasticserch it will cause an exception. The 
metadataQueryMaxSize is add to help the user to query  with elasticserch sroll 
query to avoid the limit 10000 of elasticserch.In order to fix this problem,I 
did this by not affect the other query,but support the  elasticserch sroll 
query, this will separate the queryMaxSize and metadataSize,when the 
metadataSize is litte than the resultWindowMaxSize, will query the data as the 
user setting, when the user setting the metadataSize over the 
resultWindowMaxSize, the elastic scroll query will give the metadataSize result 
as the user want, the other query will also limit by the resultWindowMaxSize 
and will not cause an exception.



-- 
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: notifications-unsubscr...@skywalking.apache.org

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

Reply via email to