nacos icon indicating copy to clipboard operation
nacos copied to clipboard

invalid usage of ProporityQueue in ConfigChangePluginManager

Open shiyiyue1102 opened this issue 1 year ago • 1 comments

Describe the bug image when use for-each statement to get elements in a propority queue, the order you get may not the same as what you want. if you want to elements out-queue with the order, you should invoke remove method to get the top element repeatedly until you get the all element. once you invoke the remove method ,you will get the top element and the lastest element in the queue will be filtering up to the top.

Suggestions: replace the propority queue with list , you should just sorting the config change plugin service lists with order in startup.

shiyiyue1102 avatar Jan 15 '24 07:01 shiyiyue1102

@lyf712

shiyiyue1102 avatar Jan 15 '24 07:01 shiyiyue1102