ChuanFF commented on code in PR #12852:
URL: https://github.com/apache/apisix/pull/12852#discussion_r2732498258


##########
apisix/discovery/kubernetes/init.lua:
##########
@@ -211,17 +211,21 @@ end
 
 
 local function post_list(handle)
-    if not handle.existing_keys or not handle.current_keys_hash then
-        return
-    end
-    for _, key in ipairs(handle.existing_keys) do
-        if not handle.current_keys_hash[key] then
-            core.log.info("kubernetes discovery module find dirty data in 
shared dict, key:", key)
-            handle.endpoint_dict:delete(key)
+    if handle.existing_keys and handle.current_keys_hash then
+        for _, key in ipairs(handle.existing_keys) do
+            if not handle.current_keys_hash[key] then
+                core.log.info("kubernetes discovery module found dirty data in 
shared dict, key: ",
+                        key)

Review Comment:
   Several indentation issues have been fixed.



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