Is the option to explicitly set per call timeout always guaranteed or is it best efforts basis?

Open
#6,188 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, kotlin, redis
Domain
backend, databases

Research direction

Start with the per-call timeout API introduced in release 3.26.0 and compare it with the client-level timeout described in the report. Reproduce the behavior using the provided Kotlin getList/readAllAsync example with Redis and determine whether the differing timeout results are expected; done means the behavior is confirmed and clearly documented or an actionable defect is identified.

Written by the indexing model from the issue text.

Description

question

Hello there,

I've been trying out the feature added in release 3.26.0, where I can set the timeout explicitly per call instead of having it set for every call done through the same client (related issue #5316).

I'm running this experiment locally (using Kotlin), using version 3.32.0, where I spun up Redis and inserted a dummy key with a very large list value to see how much time would it take to fetch the full list.

...

val redisClient = Redisson.create()

val values = getValues(key)

...

private suspend fun getValues(key: String) {
  return redisClient.getList<Value>(PlainOptions.name("$key").timeout(Duration.ofMillis(1)).retryAttempts(0).codec(Value.codec)).readAllAsync().await()
}

However I have noticed that even if I set the getList call timeout explicitly to 1 millisecond or 250 nanoseconds, it does not always timeout, but actually most of the time it runs fine. On the contrary when I set the timeout to 10 milliseconds on the client level it always times out.

Which makes me wonder if I'm using this feature incorrectly.

Looking forward to hearing back from you!

Dominant language
Java
Stars
24.4k
Forks
5.5k
Avg merge
2d 5h
Merged PRs (30d)
20

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redisson/redisson

All issues in redisson/redisson

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.