You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/05/25 08:37:33 UTC

[GitHub] [skywalking] kezhenxu94 commented on a diff in pull request #9128: Fix scroll query in Elastic Search storage

kezhenxu94 commented on code in PR #9128:
URL: https://github.com/apache/skywalking/pull/9128#discussion_r881368944


##########
oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/cache/NetworkAddressAliasEsDAO.java:
##########
@@ -62,9 +62,9 @@ public List<NetworkAddressAlias> loadLastUpdate(long timeBucketInMinute) {
 
             SearchResponse results =
                 getClient().search(NetworkAddressAlias.INDEX_NAME, search, params);
-            while (true) {
-                final String scrollId = results.getScrollId();
-                try {
+            final String scrollId = results.getScrollId();
+            try {
+                while (true) {

Review Comment:
   This is wrong, `scrollId` is never updated and you'll be always scrolling to the same context (at line 82)



-- 
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-unsubscribe@skywalking.apache.org

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