Skip to content

Commit 24845a0

Browse files
committed
Add clarifying comment
1 parent 3582c45 commit 24845a0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

core/src/worker/workflow/wft_poller.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ impl WFTPollerShared {
121121
}
122122
}
123123

124-
// If there's no sticky backlog, balance poller counts
124+
// If there's no sticky backlog, balance poller counts. This logic allows the poller
125+
// to proceed if it has the same or fewer pollers as it's opposite. There is a preference
126+
// for the sticky poller when counts are equal. This does not mean we always have equal
127+
// numbers of pollers, as later on the scaler will also prevent polling based on the scaling
128+
// information provided independently by the sticky/nonsticky queues.
125129
if *self.last_seen_sticky_backlog.0.borrow() == 0 {
126130
if let Some((sticky_active, non_sticky_active)) =
127131
self.sticky_active.get().zip(self.non_sticky_active.get())

0 commit comments

Comments
 (0)