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

934 Commits

Author SHA1 Message Date
Nikolai Vladimirov
1d9f9ab0e3 Moved implementation of push_back to general_aggregate 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
5444e077f9 Defined done_fn_type in adapters.hpp 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
ecd1573257 Call prepare_done function to form response 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
9419c857fd Corrected and cleaner implementation with comments 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
b78cf818e0 reserve function 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
7d959c1039 Addressed some comments 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
ccb17f89cd Draft version without consume_one implementation 2025-11-08 21:37:40 +01:00
Anarthal (Rubén Pérez)
c9375a44eb Adds release notes for Boost 1.89 and Boost 1.90 (#347) 2025-11-03 14:53:32 +01:00
Anarthal (Rubén Pérez)
c88f9f4666 Fixes a potential use-after-move bug in async_connect (#343) 2025-10-30 14:49:57 +01:00
Anarthal (Rubén Pérez)
682bec618d Adds request::append() (#342)
close #341
2025-10-27 15:18:46 +01:00
Anarthal (Rubén Pérez)
6791e759f9 Adds support for PUNSUBSCRIBE (#339)
Adds a test covering UNSUBSCRIBE and PUNSUBSCRIBE

close #306
2025-10-25 00:41:49 +02:00
Anarthal (Rubén Pérez)
0460b38e14 Simplifies setup_request_utils.hpp (#338)
Removes unused clear_response
Removes include in connection.hpp
Moves the header to impl/ and makes functions inline
2025-10-23 22:37:50 +02:00
Anarthal (Rubén Pérez)
033f6aaa62 Moves all logging logic to FSMs (#335)
Replaces connection_logger by buffered_logger and log_utils.hpp
Adds a system to log arbitrary values without defining new logger methods
2025-10-22 11:59:59 +02:00
Anarthal (Rubén Pérez)
42411be444 Changes request default's cancel_on_connection_lost to false (#334)
Changes request default constructor to set cancel_on_connection_lost to false, matching request::config's default initializer
Overwrites this flag to true for the setup request
Adds unit tests for the latter
2025-10-20 16:37:02 +02:00
Anarthal (Rubén Pérez)
6be0d122fb Moves the setup request execution to run_fsm (#333)
Adds unit tests to cover setup request execution in run_fsm
Entails no functional change
2025-10-20 15:56:46 +02:00
Anarthal (Rubén Pérez)
2b09ecbd78 Makes health checks flexible so they don't tear down connections under heavy load (#328)
Adds error::write_timeout

close #104
2025-10-20 15:29:20 +02:00
Anarthal (Rubén Pérez)
da09787d29 Moves logging into reader_fsm (#332)
* Removes logging all the reader actions, and logs specific messages inside the reader_fsm instead
* Adds constructors to reader actions
* Makes reader_fsm use connection_state
* Refactors reader_fsm tests
* Moves exec_fsm action printing to test code
2025-10-15 17:36:54 +02:00
Anarthal (Rubén Pérez)
f683e368dd Implements async_run as a FSM and adds tests (#330)
* Implements async_run as a FSM and adds tests
* Places all sans-io variables in connection_impl in a connection_state struct

Entails no functional change.
2025-10-13 22:19:39 +02:00
Anarthal (Rubén Pérez)
28ed27ce72 Changes cancel_on_connection_lost default to false and deprecates it (#329)
* Changes cancel_on_connection_lost default to false
* Deprecates cancel_on_connection_lost and cancel_if_not_connected
* Fixes a TODO in test_conn_exec_cancel

close #323
2025-10-11 13:30:41 +02:00
Anarthal (Rubén Pérez)
35fa68b926 Improves the cancellation discussion page (#327)
Fixes inaccuracies in request::config::cancel_if_unresponded
2025-10-09 12:11:43 +02:00
Anarthal (Rubén Pérez)
228b31917c Implements the writer as an FSM and adds tests (#325)
* Refactors the writer task into a FSM and adds unit tests.
* Adds a testing utility to check logging.

Entails no functional change (other than cosmetic word fixes to the logs).
2025-10-09 11:31:36 +02:00
Anarthal (Rubén Pérez)
d3e335942f Adds support for asio::cancel_after (#324)
* Adds support for asio::cancel_after in connection::{async_exec, async_run}
* Adds cancel_after tests
* Adds an example on using asio::cancel_after
* Adds a discussion page on timeouts and the `cancel_if_unresponded` flag

close #226
2025-10-06 18:11:25 +02:00
Anarthal (Rubén Pérez)
0c159280ba Implements connect as a FSM and fixes cancellation (#320)
Implements redis_stream::async_connect as a FSM
Adds per-operation cancellation handling code
Adds tests
2025-10-06 12:39:28 +02:00
Anarthal (Rubén Pérez)
1812be87bf Makes the CI run part of the examples (#322)
Removes a conditional from CMake that was causing examples to never be run under CI.
2025-10-03 20:08:58 +02:00
Anarthal (Rubén Pérez)
5771128f2d Adds per-operation cancellation support to async_run and cleans up cancellation (#321)
* Adds support for terminal and partial cancellation to async_run.
* Makes basic_connection::cancel use per-operation cancellation under the hood.
* Fixes a number of race conditions during cancellation which could cause the cancellation to be ignored. This could happen if the cancellation is delivered while an async handler is pending execution.
* Deprecates operation::{resolve, connect, ssl_handshake, reconnection, health_check}, in favor of operation::run. Calling basic_connection::cancel with these values (excepting reconnection) is now equivalent to using operation::run.
* Fixes a problem in the health checker that caused ping timeouts to be reported as cancellations.
* Sanitizes how the parallel group computes its final error code.
* Simplifies the reader, writer and health checker to not care about connection cancellation. This is now the responsibility of the parallel group.
* Removes an unnecessary setup_cancellation action in the reader FSM.
* Adds documentation regarding per-operation cancellation to async_receive.
* Adds additional health checker tests.
* Adds async_run per-operation cancellation tests.
* Adds reader FSM cancellation tests.
* Makes test_conn_exec_retry tests more resilient.
* Removes leftovers in the UNIX and TLS reconnection tests. These were required due to race conditions that have already been fixed.

close #318 
close #319
2025-10-03 18:48:30 +02:00
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