Skip to content

ClusterClient: no way to execute transaction without WATCH/UNWATCH #435

Closed
@flyingmutant

Description

Regular Client has Watch(), which is doing MULTI/EXEC (no WATCH/UNWATCH) when no keys are specified.

This behaviour is impossible to obtain using ClusterClient: you have to specify at least 1 key (so that master node can be selected), but you have no way to avoid passing it to Client.Watch. Thus, every transaction is wrapped in WATCH/UNWATCH pair.

Workaround (use a bogus random key with the hash slot you want) is not very elegant.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions