Skip to content

Feature Request: Support specific Retryable Command #919

@wyxloading

Description

@wyxloading

In most of our cases, we use redis as a key/value store. Most of the redis operations are like Set key value. These redis write operations run within a logical lock context, which guarantee these redis write operations are "Retryable" for us.

We want to automaticlly retry these "Retryable" write operations with network issues or redis retryable errors ( just like it performs now with ReadOnly commands ).

Can be add some apis for Setting a command with a Retryable flag ?

--- err := client.Do(ctx, client.B().Set().Key("key").Value("value").Build()).Error()
+++ err := client.DoRetryable(ctx, client.B().Set().Key("key").Value("value").Build()).Error()
--- err := client.Do(ctx, client.B().Set().Key("key").Value("value").Build()).Error()
+++ err := client.Do(ctx, client.B().Set().Key("key").Value("value").Build().Retryable()).Error()

Metadata

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