boostorg / boostorg/redis

Better error messages when BOOST_ASIO_CONCURRENCY_HINT_UNSAFE is set

Open
#376 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
282
Forks
49
PR merge metrics
No merged PRs in 30d

Description

We should either support `BOOST_ASIO_CONCURRENCY_HINT_UNSAFE` or improve the error message when it is set (or any other [hint](https://www.boost.org/doc/libs/latest/doc/html/boost_asio/overview/core/configuration.html) that prevents `async_resolve`). At the moment constructing an `io_context` with `BOOST_ASIO_CONCURRENCY_HINT_UNSAFE` produces the following error messages

```
(Boost.Redis) Trying to connect to Redis server at 127.0.0.1:6379 (TLS disabled)
(Boost.Redis) Connect: hostname resolution failed: Operation not supported [system:95]
(Boost.Redis) Failed to connect to Redis server at 127.0.0.1:6379 (TLS disabled): Operation not supported [system:95]
(Boost.Redis) Trying to connect to Redis server at 127.0.0.1:6379 (TLS disabled)
(Boost.Redis) Connect: hostname resolution failed: Operation not supported [system:95]
(Boost.Redis) Failed to connect to Redis server at 127.0.0.1:6379 (TLS disabled): Operation not supported [system:95]
(Boost.Redis) Trying to connect to Redis server at 127.0.0.1:6379 (TLS disabled)
(Boost.Redis) Connect: hostname resolution failed: Operation not supported [system:95]
(Boost.Redis) Failed to connect to Redis server at 127.0.0.1:6379 (TLS disabled): Operation not supported [system:95]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure by constructing an io_context with BOOST_ASIO_CONCURRENCY_HINT_UNSAFE and attempting the Redis connection shown in the issue. Inspect the async_resolve path and its error reporting; done means either supporting the hint or replacing the repeated Operation not supported messages with a clear explanation of the incompatible hint.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, redis
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.