2
0
mirror of https://github.com/boostorg/redis.git synced 2026-01-19 16:52:08 +00:00
Commit Graph

953 Commits

Author SHA1 Message Date
Marcelo Zimbres
98f5a55c4a Laze rotations 2025-12-29 02:07:36 +01:00
Anarthal (Rubén Pérez)
7750a6b126 Splits read_buffer tests to a separate file (#368) 2025-12-03 08:53:03 +01:00
Anarthal (Rubén Pérez)
2bbf0090b5 Mark consume_one as deprecated (#365)
close #353
2025-12-02 11:20:56 +01:00
Anarthal (Rubén Pérez)
02632b31c6 Removes ostream inclusion from public headers (#364)
close #361
2025-12-02 11:20:32 +01:00
Anarthal (Rubén Pérez)
6005ebd04a Fixes std::tuple serialization and adds tests (#363)
* Fixes a problem that caused passing ranges containing tuples into `request::push_range` to generate invalid commands.
* Adds test_serialization
* Updates request reference docs to reflect the requirements of the types passed to push and push_range

close #360
2025-12-02 11:20:01 +01:00
Anarthal (Rubén Pérez)
755d14a10d Renames test_setup_request_utils to test_compose_setup_request (#359) 2025-11-29 22:26:37 +01:00
Anarthal (Rubén Pérez)
d9e4b2c720 Improves flat_tree implementation (#358)
* Makes flat_tree implementation use a custom buffer. This allows:
  * Never dangling nodes (previously, node values could dangle after calling reserve() or if notify_done() wasn't called).
  * Reduced memory consumption
  * Increased runtime speed
* Changes flat_tree assignment to the usual signature and semantics
* Fixes a bug causing an assertion to trigger when copy-constructing an empty flat_tree.
* Changes basic_node operator== and operator!= return type 
* Adds generic_flat_response, basic_tree, tree, view_tree, flat_tree to the reference page.
* Adds a missing resp3:: qualifier to all names in the reference page that belong to the resp3 namespace.
* Adds reference documentation to flat_tree.
* Mentions generic_flat_response in the discussion.
* Adds operator!= for basic_node to basic_node's reference page.
* Adds test_flat_tree.

close #357 
close #354 
close #352
2025-11-29 21:35:53 +01:00
Marcelo
91afb4a279 Fixes SBO problem and adds some tests (#356) 2025-11-20 14:38:49 +01:00
Anarthal (Rubén Pérez)
bdd9c327c1 Adds Sentinel support (#345)
close #237
close #269
close #268
close #229
2025-11-19 22:31:19 +01:00
Marcelo
00f3ec9b78 Merge pull request #340 from boostorg/263-marcelo
Concludes the work on the generic_flat_response started by Nikolai Vladimirov
2025-11-18 14:10:23 +01:00
Marcelo Zimbres
b365b96228 Fixup Adds generic_flat_response typedef 2025-11-10 23:21:16 +01:00
Marcelo Zimbres
2c1f1c4c50 Concludes the work started by Nikolai Vladimirov on the generic_flat_response 2025-11-09 21:37:39 +01:00
Nikolai Vladimirov
6ff474008f Cosmetic changes 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
bd799aff96 create flat_response_value::add_node() 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
c284960549 Replaced generic_response with generic_flat_response in tests 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
b1420d3d1d Adjust code base to new changes 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
84fa39918f Added API for generic_flat_response, replaced generic_response with new response type in tests 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
019a080b65 Get rid of type erasion in details::prepare_done 2025-11-08 21:37:40 +01:00
Nikolai Vladimirov
53e5ae0cd4 Avoid turning throwing consume_one into template 2025-11-08 21:37:40 +01:00
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