diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 3f11c8af..00000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Coverage - -on: - push: - branches: - - develop - -jobs: - posix: - defaults: - run: - shell: bash - - runs-on: ubuntu-22.04 - env: - CXX: g++-11 - CXXFLAGS: -g -O0 -std=c++20 --coverage -fkeep-inline-functions -fkeep-static-functions - LDFLAGS: --coverage - CMAKE_BUILD_PARALLEL_LEVEL: 4 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install dependencies - run: sudo apt-get --no-install-recommends -y install cmake lcov g++-11 redis-server python3 libgd-perl - - - name: Setup Boost - run: ./tools/ci.py setup-boost --source-dir=$(pwd) - - - name: Build Boost - run: ./tools/ci.py build-b2-distro --toolset=gcc-11 - - # Having our library there confuses the coverage reports - - name: Remove Boost.Redis from the b2 distro - run: rm -rf ~/boost-b2-distro/include/boost/redis - - - name: Run CMake - run: cmake -DCMAKE_PREFIX_PATH=$HOME/boost-b2-distro --preset coverage . - - - name: Build - run: cmake --build --preset coverage - - - name: Test - run: ctest --preset coverage - - - name: Make the coverage file - run: cmake --build --preset coverage --target coverage - - - name: Upload to codecov - run: | - bash <(curl -s https://codecov.io/bash) -f ./build/coverage/coverage.info diff --git a/CMakeLists.txt b/CMakeLists.txt index b86c4264..35df41fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,6 @@ if (BOOST_REDIS_MAIN_PROJECT) align context core - coroutine static_assert pool date_time diff --git a/README.md b/README.md index 567fb2dd..139c6d22 100644 --- a/README.md +++ b/README.md @@ -678,25 +678,32 @@ https://lists.boost.org/Archives/boost/2023/01/253944.php. ### Boost 1.87 -* ([Issue 205](https://github.com/boostorg/redis/issues/205)) +* (Issue [205](https://github.com/boostorg/redis/issues/205)) Improves reaction time to disconnection by using `wait_for_one_error` instead of `wait_for_all`. The function `connection::async_run` was also changed to return EOF to the user when that error is received from the server. That is a breaking change. -* ([Issue 210](https://github.com/boostorg/redis/issues/210)) +* (Issue [210](https://github.com/boostorg/redis/issues/210)) Fixes the adapter of empty nested reposponses. +* (Issues [211](https://github.com/boostorg/redis/issues/211) and [212](https://github.com/boostorg/redis/issues/212)) + Fixes the reconnect loop that would hang under certain conditions, + see the linked issues for more details. + +* (Issue [219](https://github.com/boostorg/redis/issues/219)) + Changes the default log level from `disabled` to `debug`. + ### Boost 1.85 -* ([Issue 170](https://github.com/boostorg/redis/issues/170)) +* (Issue [170](https://github.com/boostorg/redis/issues/170)) Under load and on low-latency networks it is possible to start receiving responses before the write operation completed and while the request is still marked as staged and not written. This messes up with the heuristics that classifies responses as unsolicied or not. -* ([Issue 168](https://github.com/boostorg/redis/issues/168)). +* (Issue [168](https://github.com/boostorg/redis/issues/168)). Provides a way of passing a custom SSL context to the connection. The design here differs from that of Boost.Beast and Boost.MySql since in Boost.Redis the connection owns the context instead of only @@ -704,16 +711,16 @@ https://lists.boost.org/Archives/boost/2023/01/253944.php. apps need only one connection for their entire application, which makes the overhead of one ssl-context per connection negligible. -* ([Issue 181](https://github.com/boostorg/redis/issues/181)). +* (Issue [181](https://github.com/boostorg/redis/issues/181)). See a detailed description of this bug in [this](https://github.com/boostorg/redis/issues/181#issuecomment-1913346983) comment. -* ([Issue 182](https://github.com/boostorg/redis/issues/182)). +* (Issue [182](https://github.com/boostorg/redis/issues/182)). Sets `"default"` as the default value of `config::username`. This makes it simpler to use the `requirepass` configuration in Redis. -* ([Issue 189](https://github.com/boostorg/redis/issues/189)). +* (Issue [189](https://github.com/boostorg/redis/issues/189)). Fixes narrowing convertion by using `std::size_t` instead of `std::uint64_t` for the sizes of bulks and aggregates. The code relies now on `std::from_chars` returning an error if a value diff --git a/include/boost/redis/detail/connector.hpp b/include/boost/redis/detail/connector.hpp index 9d4d2716..c9a31b08 100644 --- a/include/boost/redis/detail/connector.hpp +++ b/include/boost/redis/detail/connector.hpp @@ -42,10 +42,10 @@ struct connect_op { ctor_->endpoint_ = ep; if (ec == asio::error::operation_aborted) { - ec == error::connect_timeout; + self.complete(redis::error::connect_timeout); + } else { + self.complete(ec); } - - self.complete(ec); } } }; diff --git a/include/boost/redis/detail/resolver.hpp b/include/boost/redis/detail/resolver.hpp index f5406fdd..4eb00457 100644 --- a/include/boost/redis/detail/resolver.hpp +++ b/include/boost/redis/detail/resolver.hpp @@ -41,9 +41,10 @@ struct resolve_op { resv_->results_ = res; if (ec == asio::error::operation_aborted) { - ec == error::resolve_timeout; + self.complete(error::resolve_timeout); + } else { + self.complete(ec); } - self.complete(ec); } } }; diff --git a/include/boost/redis/logger.hpp b/include/boost/redis/logger.hpp index 152e7ed0..b102f022 100644 --- a/include/boost/redis/logger.hpp +++ b/include/boost/redis/logger.hpp @@ -64,7 +64,7 @@ class logger { * * @param l Log level. */ - logger(level l = level::disabled) + logger(level l = level::debug) : level_{l} {} diff --git a/test/test_conn_push.cpp b/test/test_conn_push.cpp index ff2a9356..2cc13ab4 100644 --- a/test/test_conn_push.cpp +++ b/test/test_conn_push.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #define BOOST_TEST_MODULE conn-push #include #include @@ -21,7 +21,7 @@ namespace redis = boost::redis; using boost::redis::operation; using connection = boost::redis::connection; using error_code = boost::system::error_code; -using net::experimental::as_tuple; +using net::as_tuple; using boost::redis::request; using boost::redis::response; using boost::redis::ignore; diff --git a/test/test_conn_run_cancel.cpp b/test/test_conn_run_cancel.cpp index 425367e0..f4f0b73d 100644 --- a/test/test_conn_run_cancel.cpp +++ b/test/test_conn_run_cancel.cpp @@ -15,14 +15,14 @@ #ifdef BOOST_ASIO_HAS_CO_AWAIT #include -#include +#include namespace net = boost::asio; using boost::redis::operation; using boost::redis::connection; using boost::system::error_code; -using net::experimental::as_tuple; +using net::as_tuple; using boost::redis::request; using boost::redis::response; using boost::redis::ignore;