2
0
mirror of https://github.com/boostorg/redis.git synced 2026-01-19 04:42:09 +00:00
Commit Graph

909 Commits

Author SHA1 Message Date
Marcelo
2babb79425 Merge pull request #311 from boostorg/refactoring_clean_code
Simplifies the read_buffer and add rotated bytes to usage.
2025-09-29 21:50:19 +02:00
Marcelo Zimbres
a70bdf6574 Simplifies the read_buffer and adds rotated bytes to usage.
Data rotation in the read buffer creates latency, we know it
is preset but so far its magnitude was unknown. This PR adds
it as a new field to the usage struct. For example, the
test_conn_echo_stress outputs now

   Commands sent: 780,002
   Bytes sent: 32,670,085
   Responses received: 780,001
   Pushes received: 750,001
   Bytes received (response): 3,210,147
   Bytes received (push): 32,250,036
   Bytes rotated: 3,109,190,184

In total approximately 34Mb are received but 3Gb are
rotated.
2025-09-28 13:02:12 +02:00
Anarthal (Rubén Pérez)
e414b3941a Simplifies the health checker (#317)
Modifies the health checker to use asio::cancel_after rather than a separate parallel group task
2025-09-27 19:08:19 +02:00
Anarthal (Rubén Pérez)
beab3f69ed Reduces the time elapsed by test_conn_health_check and adds test_conn_monitor (#316)
Splits test_conn_health_check into a test to verify that the health checker works and another to verify that MONITOR is handled correctly.
Tests no longer wait or use CLIENT PAUSE
2025-09-27 18:13:02 +02:00
Anarthal (Rubén Pérez)
f955dc01d2 Adds reliable cancellation support to async_exec (#310)
* Terminal cancellation in async_exec no longer tears down the connection when the cancelled request has been sent to the server.
* Adds support for partial cancellation in async_exec with the same semantics.
2025-09-26 12:50:42 +02:00
Anarthal (Rubén Pérez)
bcf120bd8f Increases antora log level and fixes a broken link (#315)
close #313
2025-09-24 12:53:42 +02:00
Anarthal (Rubén Pérez)
203e9298ed Fixes a race condition when cancelling requests on connection lost (#309)
Changes how cancel_on_conn_lost is used to ensure it is called only once and after the reader and writer tasks have exited.
This fixes a problem in test_conn_reconnect
Adds a test for multiplexer::reset()
Adds stronger invariants to the multiplexer functions to be called by the reader and writer
Removes test_issue_181, since the same functionality is being covered by unit tests already
Removes basic_connection::run_is_canceled
2025-09-22 13:04:28 +02:00
Anarthal (Rubén Pérez)
8da18379ba Replaces tribool by an enum and adds coverage for multiplexer (#301)
* In the context of the multiplexer, replaces tribool by consume_result to enhance readability and make values smaller
* Splits the multiplexer tests out of test_low_level_sync_sans_io into a separate test file
* Increases testing coverage for the multiplexer class

Entails no functional change.
2025-09-18 13:55:29 +02:00
Anarthal (Rubén Pérez)
40417a13b2 Deprecates request::config::hello_with_priority (#305) 2025-09-16 00:49:33 +02:00
Anarthal (Rubén Pérez)
74909be47d Removes CMakePresets.json (#304) 2025-09-15 14:19:04 +02:00
Anarthal (Rubén Pérez)
6a1a07f95a Adds custom setup requests (#303)
Adds config::setup and config::use_setup, to run arbitrary Redis commands on connection establishment
Improves docs for config::{username, password, clientname, database_index}
Splits all connection establishment tests into test_conn_hello

close #302
2025-09-15 14:15:11 +02:00
Anarthal (Rubén Pérez)
0cf2441ed2 Removes handshaker in favor of asio::deferred (#291)
Refactors the handshake process to use asio::deferred instead of a custom composed operation.
Fixes logging on HELLO error (close #297)
Fixes a potential problem on reconnection after a HELLO error is encountered (close #290)
Fixes a race condition in the health checker that could cause it to never exit on cancellation
Adds support for users with a username different than "default" and an empty password (close #298)
Adds integration testing for authentication
Adds unit testing for the hello utility functions
2025-09-04 16:48:00 +02:00
Anarthal (Rubén Pérez)
2133ed747b Fixes an exception when parsing intercalated errors and success messages into generic_response (#289)
close #287
2025-09-01 20:18:35 +02:00
Anarthal (Rubén Pérez)
1f6c6bd64d Adds Valkey CIs and docs (#296)
* Adds Valkey CIs

Modifies existing builds to use different database flavors and versions:
* Redis 7.4.5
* Redis 8.2.1
* Valkey 8.1.3

* Update docs
2025-09-01 20:14:26 +02:00
Marcelo
da2f0101d0 Merge pull request #286 from boostorg/parser_events
Add parse event init, node and done.
2025-08-10 17:04:26 +02:00
Marcelo Zimbres
a76a621b0b More code review changes. 2025-08-02 13:38:19 +02:00
Marcelo Zimbres
16bf57cf33 Add parse event init, node and done. 2025-07-26 22:44:53 +02:00
Anarthal (Rubén Pérez)
88d8f3c0ca Makes all objects in connection have a stable address (#285)
Moves read_buffer memory reservation to the connection's constructor
Makes read_buffer memory reservation size be a power of 2
2025-07-25 22:51:14 +02:00
Marcelo
20ab2c7e70 Merge pull request #283 from boostorg/refactoring_clean_code
Removes async_append_some
2025-07-22 20:51:50 +02:00
Marcelo Zimbres
8ee2213efe Code review changes. 2025-07-20 18:38:02 +02:00
Marcelo Zimbres
97d71d1d6b Removes async_append_some. 2025-07-17 12:37:17 +02:00
Anarthal (Rubén Pérez)
76129bbcb8 Merge pull request #282 from boostorg/develop
Migrates the documentation to Asciidoc/MrDocs (#276)
boost-1.89.0
2025-07-08 21:07:52 +02:00
Anarthal (Rubén Pérez)
adf17f2b3b Migrates the documentation to Asciidoc/MrDocs (#276)
Fixes some typos

close #247
2025-07-02 23:27:33 +02:00
Marcelo
6499818911 Merge pull request #280 from boostorg/develop
Sync master with develop for boost release
2025-07-02 13:27:48 +02:00
Marcelo Zimbres
963ae8d145 Disables msvc-14.2 builds 2025-07-02 13:09:58 +02:00
Anarthal (Rubén Pérez)
fe4ba64a97 Makes the reconnection loop retry on errors (#275)
After an error is encountered during name resolution, connection establishment, SSL handshake, Redis hello, reading or writing, async_run will now keep retrying if the configuration requests it

close #255
2025-06-29 19:02:22 +02:00
Marcelo
b82224700e Merge pull request #274 from boostorg/refactoring_clean_code
Adds a sans-io fsm to the read operation.
2025-06-23 22:40:42 +02:00
Marcelo Zimbres
620b1e9510 Adds a sans-io fsm for read operation. 2025-06-23 22:24:46 +02:00
Anarthal (Rubén Pérez)
f04d97ffa5 Updates the Logger interface to allow extensibility and type erasure (#273)
Removes all the logger::on_xxx functions
Removes the Logger template parameter to async_run
Adds a logger constructor that allows passing a std::function to customize logging behavior
Adds constructors to connection and basic_connection taking a logger
Deprecates config::logger_prefix
Deprecates the async_run overload taking a logger parameter
Deprecates the basic_connection::async_run overload not taking any config object
Deprecates the basic_connection::next_layer_type typedef
Makes the default log level logger::info
Makes the logging thread-safe
Cleans up deprecated functionality from examples
Adds docs on logging
Adds an example on how to integrate spdlog into Boost.Redis logging

close #213
2025-06-23 12:07:21 +02:00
Anarthal (Rubén Pérez)
7304d99bf6 Adds support for UNIX sockets (#272)
close #246
2025-06-20 13:23:39 +02:00
Anarthal (Rubén Pérez)
89a42dbf74 async_exec now uses a sans-io strategy (#250)
async_exec now supports partial and total cancellation when the request is pending
Added docs on async_exec's cancellation support
Added detail::exec_fsm and macros for coroutine emulation
Requests are now removed from the multiplexer when an error is encountered
2025-06-10 20:42:59 +02:00
Anarthal (Rubén Pérez)
a39d130240 Adds a redis_stream class that encapsulates connection, reading and writing (#266)
Deprecates get_ssl_context for connection and basic_connection
Deprecates reset_stream for connection and basic_connection
2025-06-07 19:15:42 +02:00
Anarthal (Rubén Pérez)
6d5b550bb3 Restores the TLS tests in CI (#267)
Renews test certificates
Recovers and refactors test_conn_tls.cpp
Adds a test for TLS reconnection
2025-06-07 18:37:09 +02:00
Anarthal (Rubén Pérez)
4a2085c800 Uses ignore as default for connection::async_exec (#265)
Updates test_conn_echo_stress.cpp to use this default

close #264
2025-06-07 13:21:20 +02:00
Anarthal (Rubén Pérez)
2fc54bc73b Increases the robustness of integration tests (#259)
Updates multiplexer to make requests complete with error_code() rather than error_code(0)
Integration tests now use io_context::run_for to run with a timeout and avoid deadlocks
Tests now use concrete lambdas where generic ones are not required
Tests now use BOOST_TEST with operator== to print values on error
Tests now use anonymous namespaces to detect dead code
Adds run_coroutine_test and removed start from common.hpp
Updates test_reconnect to perform relevant checks
Refactors how test_issue_50 launches its coroutines
Groups tests in CMake as unit or integration
Updates Jamfile tests to contain all unit tests and only unit tests
2025-06-06 12:48:40 +02:00
Anarthal (Rubén Pérez)
0c8c6fcc09 Fixes a memory corruption in logger and adds sanitizer builds to CI (#261)
logger now owns the prefix string
This fixes a use-after-stack-return memory error in async_run
Adds a clang-19 and a gcc-14 build to CI with the address and undefined behavior sanitizer enabled

close #260
2025-06-01 13:40:37 +02:00
Marcelo
479068e778 Merge pull request #258 from boostorg/refactoring_clean_code
Refactors reader_op to simplify sans-io.
2025-05-29 14:52:04 +02:00
Marcelo Zimbres
35d50700b9 Refactors reader_op to simplify sans-io. 2025-05-25 12:04:28 +02:00
Anarthal (Rubén Pérez)
b58e4f94de Marks the next_layer() functions as deprecated (#256)
CI builds now use BOOST_ALLOW_DEPRECATED to prevent warnings
2025-05-25 11:05:07 +02:00
Anarthal (Rubén Pérez)
e8b13bd7a0 Enables -Wall and -Werror in CIs (#254)
Removed warnings in:

* bench/echo_server_client.cpp (parameter shadowing)
* include/boost/redis/adapter/detail/adapters.hpp (unused parameter)
* include/boost/redis/connection.hpp (unused parameter)
* include/boost/redis/resp3/impl/parser.ipp (signed to unsigned conversion)
* test/test_conversions.cpp (signed to unsigned comparison)
* test/test_issue_50.cpp (superfluous move)
* test/test_low_level_sync_sans_io.cpp (signed to unsigned comparison)
2025-05-20 20:30:15 +02:00
Anarthal (Rubén Pérez)
c1c50e3e24 Reconnection no longer causes the writer to perform busy waiting (#253)
Reconnection now uses a separate timer to wait

close #252
2025-05-19 16:46:56 +02:00
Anarthal (Rubén Pérez)
328ad97a79 Adds automatic formatting with clang-format 2025-05-12 13:49:55 +02:00
Marcelo
1060733b84 Merge pull request #248 from boostorg/refactoring_clean_code
Sans-io multiplexing
2025-05-10 20:52:10 +02:00
Marcelo Zimbres
f9d0679be5 Splits the multiplexer out of the connection. 2025-05-04 11:39:34 +02:00
Marcelo
11e54de8f8 Merge pull request #244 from boostorg/develop
Sync master with develop
2025-04-26 20:07:46 +02:00
Marcelo Zimbres
109248d53b Removes unnecessary dynamic buffer. 2025-04-26 19:24:21 +02:00
Marcelo
f7b4ec291e Merge pull request #239 from anarthal/bugfix/238-int-conversions
Responses now admit all integer types again
2025-04-07 22:48:48 +02:00
Ruben Perez
c4e31e5f2f Floating point tests 2025-04-07 11:38:44 +02:00
Ruben Perez
f32da1b0e3 tests for boolean 2025-04-07 11:30:28 +02:00
Ruben Perez
8b98081ccf Fixed the problem 2025-04-07 11:21:56 +02:00