XingyuFu opened a new issue, #10998:
URL: https://github.com/apache/skywalking/issues/10998

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache SkyWalking Component
   
   OAP server (apache/skywalking)
   
   ### What happened
   
   I have a question for ElasticSearchScroller.
   there's a while(true) in the code.
   
![6CE17380-C30C-4640-A83A-09C2F9C2850F](https://github.com/apache/skywalking/assets/19774938/261e779a-59d3-4d86-a6ca-dc97bc8a3551)
   the total field in the response represents the total number of documents 
that match my search query.
   if the batchSize is 5000, and the queryMaxSize is 10000.
   And if we have 5100 documents for the query, so the total is 5100, it is 
bigger than search.getSize() and smaller than queryMaxSize.
   And then we can't break from the while cycle.
   
   
   
   ### What you expected to happen
   
   skywalking oap will query ES too many times because it is still in a while 
cycle.
   
   ### How to reproduce
   
   fill enough size data in ES, bigger than batch size and smaller than max 
size.
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to