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 difference comes from the different timing of calling SelectServer. del will use Select(command, key, flags) to select a server before building the Message (determines whether to use del or unlink depending on the server version).
And the set command will select a server in PrepareToPushMessageToBridge based on message.flags (determined by IsPrimaryOnly()).
we should use Select(command, key, DemandMaster) to fix for del and other commands(like pexpire,expire) or throw ExceptionFactory.PrimaryOnly(...)?
The text was updated successfully, but these errors were encountered:
// it throws RedisCommandException: Command cannot be issued to a replica.
KeyDeleteAsync("a", CommandFlags.PreferReplica);
// successfully.
StringSetAsync("a", "a", flags: CommandFlags.PreferReplica);
The difference comes from the different timing of calling SelectServer.
del
will useSelect(command, key, flags)
to select a server before building the Message (determines whether to use del or unlink depending on the server version).And the
set
command will select a server inPrepareToPushMessageToBridge
based on message.flags (determined by IsPrimaryOnly()).we should use
Select(command, key, DemandMaster)
to fix fordel
and other commands(like pexpire,expire) orthrow ExceptionFactory.PrimaryOnly(...)
?The text was updated successfully, but these errors were encountered: