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


##########
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:
   
![image](https://user-images.githubusercontent.com/3417650/170228950-ec842e00-f99c-480e-92e9-f3f96fd70608.png)
   
   > This is wrong, `scrollId` is never updated.
   
   Yes, the `scrollId` is never updated. So we can't delete the `scrollId` 
after executing the scroll once, it cannot scroll it again based on the same 
`scrollId` for the second time.
   
   BTW: I have added some logs in the `NetworkAddressAliasEsDAO.java`, so the 
code line in the screenshot is not the same as the `master` branch code. 



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