mengw15 commented on code in PR #6906:
URL: https://github.com/apache/texera/pull/6906#discussion_r3651859920
##########
amber/src/main/python/core/util/customized_queue/linked_blocking_multi_queue.py:
##########
@@ -418,9 +418,12 @@ def add_sub_queue(self, key: K, priority: int) ->
Optional[SubQueue]:
added = True
break
elif pg.priority > priority:
+ # pg has a lower priority than the new group, so the
new
+ # group belongs in front of it: priority_groups must
stay
+ # sorted because the selection strategy walks it in
order.
new_pg =
LinkedBlockingMultiQueue.PriorityGroup(priority)
new_pg.add_queue(sub_queue)
- self.priority_groups.append(new_pg)
+ self.priority_groups.insert(i, new_pg)
Review Comment:
Correct, and this is exactly the defect #6903 fixes — it changes both
construction sites to `self.PriorityGroup(...)`, which is what makes
`remove_sub_queue` work for an enabled sub-queue. I've left those two lines
alone here so the two PRs don't touch the same line; this one only changes the
`append` on the following line. #6903 is filed under #6899.
--
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]