yikuaibro commented on issue #264:
URL: 
https://github.com/apache/shardingsphere-on-cloud/issues/264#issuecomment-1476009562

   **Test environmen**t:
   k8s v1.20
   operator v lasted
   **Test case**:
   Simulate ```kubectl get pod``` inside the code to get the latest pod status. 
In order to be as consistent as possible with the podList time obtained by 
```ComputeNodeReconciler.List```, eliminate the intermediate pod changes and 
synchronize them.
   Add the source code of the ```func printpod``` part in k8s to compare with 
the current ```func getReadyInstances``` results, and get three kinds of data:
   
   - execPod: command result
   - testPod: partial results of the source code
   - realPod: the original logic result
   
   **Testing**:
   
![image](https://user-images.githubusercontent.com/44493045/226317460-4d2e64c5-61b8-46bd-9c5e-84a7f7032d5c.png)
   
![image](https://user-images.githubusercontent.com/44493045/226318696-4b21bf8f-34d9-4771-9aab-f6ed5f229819.png)
   
   **Conclusion**:
   The error between execPod and testPod is almost within 1 second, and the 
content of testPod is consistent with the original logic. It is not a problem 
of getReadyInstances. It may be caused by the delay when the return value is 
rendered to computenode, or the cache problem of apiserver.


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