-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix message order issue for management SDK #1801
base: dev
Are you sure you want to change the base?
Conversation
var connectionUsed = await WriteWithRetry(serviceMessage, _inUseConnection, currentConnections, IterateConnectionsInFixedOrder); | ||
// Similarly, here is currently no synchronization when persisting selected connection in _inUseConnection. | ||
|
||
if (connectionUsed != _inUseConnection) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check+set is not atomic, maybe simply set
@@ -515,22 +516,21 @@ private async Task WriteToScopedOrRandomAvailableConnection(ServiceMessage servi | |||
} | |||
else | |||
{ | |||
await WriteWithRetry(serviceMessage, null, currentConnections); | |||
var connectionUsed = await WriteWithRetry(serviceMessage, _inUseConnection, currentConnections, IterateConnectionsInFixedOrder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it changes the current behavior that the traffic distributes to random connections for proxy mode. is using random connections enough?
} | ||
} | ||
iterator ??= iterateConnections(currentConnections).GetEnumerator(); | ||
connection = iterator.MoveNext() ? iterator.Current : throw new ServiceConnectionNotActiveException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using do.. while(iterator.MoveNext())
pattern?
No description provided.