You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar issues.
What happened
According to PriorityBlockingQueue document, iterator order is undefined.
This class and its iterator implement all of the optional methods of the Collection and Iterator interfaces. The Iterator provided in method iterator() and the Spliterator provided in method iterator() are not guaranteed to traverse the elements of the PriorityBlockingQueue in any particular order. If you need ordered traversal, consider using Arrays.sort(pq.toArray()).
In dolphinscheduler operation, Every WorkerGroupRefreshInterval, ServerNodeManager.refreshNodesAndGroupMappings will be triggerred, and the master slot index will be refreshed by refreshMasterList.
But iterator order of MasterPriorityQueue is undefined, thus even if the host server create time is not affected, the slot index may change every WorkerGroupRefreshInterval. This will make slot assigment between servers change unintentionally.
Search before asking
What happened
According to PriorityBlockingQueue document, iterator order is undefined.
In dolphinscheduler operation, Every
WorkerGroupRefreshInterval
,ServerNodeManager.refreshNodesAndGroupMappings
will be triggerred, and the master slot index will be refreshed byrefreshMasterList
.But iterator order of MasterPriorityQueue is undefined, thus even if the host server create time is not affected, the slot index may change every
WorkerGroupRefreshInterval
. This will make slot assigment between servers change unintentionally.What you expected to happen
If not server is added or removed, the slot index should be the same guranteed.
How to reproduce
According to document, the iteration order is not guranteed.
Anything else
No response
Version
dev
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: