Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

Add a client timeout for synchronous command execution [JIRA: CLIENTS-818] #609

Description

@bwittwer

Hello,

The synchronous execute method() in the RiakCommand is actually a wrapper around the asynchronous executeAsync() method. But it has no possibility to specify a timeout on the underlying Future.

As the future.get() is currently done without any timeout this might result in calling thread hanging forever if the future is never resolved (for whatever reason).

To allow isolating the caller thread from the internal retry and pooling mechanism of the client, we propose to add another execute() to the RiakCommand and RiakClient with the timeout.

Thanks.
Kind regards.
Bernard.

Activity

  1. changed the title [-]Add a client timeout for synchronous command execution[/-] [+]Add a client timeout for synchronous command execution [JIRA: CLIENTS-818][/+] on Apr 6, 2016
  2. jplock commented on Apr 6, 2016

    @jplock
    Contributor

    Don't most of the KV commands already expose a timeout option in the request builders?

  3. jplock commented on Apr 6, 2016

    @jplock
    Contributor

    Or I guess that's a server side timeout, not client side

  4. bwittwer commented on Apr 6, 2016

    @bwittwer
    ContributorAuthor

    The command timeout is the Riak-side timeout. It will be sent to Riak as part of the PB message (example: https://github.com/basho/riak_pb/blob/develop/src/riak_kv.proto#L56).
    Here the proposal is a pure client-side timeout: if a connection to Riak is in progress or established when a node shutdowns, it might results in them not being handled nicely.

  5. angrycub commented on Jul 18, 2016

    @angrycub
    Contributor

    This was closed by #642 which extended #610 with test cases. Thanks @bwittwer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions