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
The round-robin is done from the index field of the Session type, but since the LoginCtx is often cloned, most request will bump index but then drop it, meaning that most operation do not bump a "global" index for each slot. Also each session has its own index, but the index should proably be stored per-slot.
Fixes:
Clone the LoginCtx much less, and instead pass a &mut LoginCtx everywhere. This wouldn't work everywhere though.
Store an atmoicusize in the Slot and keep a Arc to it in the LoginCtx instead, but then there are race conditions where multiple parallel requests to the same slot will "skip" an instance and retry some other instance twice.
Keep the round-robin per-session, but rotate the starting instance of each session when the session is created.
The text was updated successfully, but these errors were encountered:
The round-robin is done from the
index
field of theSession
type, but since theLoginCtx
is often cloned, most request will bumpindex
but then drop it, meaning that most operation do not bump a "global" index for each slot. Also each session has its own index, but the index should proably be stored per-slot.Fixes:
Clone the
LoginCtx
much less, and instead pass a&mut LoginCtx
everywhere. This wouldn't work everywhere though.Store an atmoicusize in the
Slot
and keep aArc
to it in theLoginCtx
instead, but then there are race conditions where multiple parallel requests to the same slot will "skip" an instance and retry some other instance twice.Keep the round-robin per-session, but rotate the starting instance of each session when the session is created.
The text was updated successfully, but these errors were encountered: