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.  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]
