nacos
nacos copied to clipboard
invalid usage of ProporityQueue in ConfigChangePluginManager
Describe the bug
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.
@lyf712