Skip to content

Commit a82bee5

Browse files
committed
new logs
Signed-off-by: Shoham Elias <shohame@amazon.com>
1 parent 738bf24 commit a82bee5

File tree

7 files changed

+624
-156
lines changed

7 files changed

+624
-156
lines changed

glide-core/redis-rs/redis/src/aio/multiplexed_connection.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ where
193193
} => {
194194
match result {
195195
Ok(Value::ServerError(err)) if *is_transaction => {
196+
println!(
197+
"Transaction ServerError received: {}. This indicates an error occurred between MULTI and EXEC.",
198+
err
199+
);
196200
// In transactions, `count` is always 1 because the final result is a single array (`offset + count = expected_response_count`).
197201
// If we receive a `ServerError` here, it means the error occurred between `MULTI` and `EXEC`.
198202
// After `EXEC`, the response is always a single array of results, so any error at this stage must have happened before `EXEC` was sent.
@@ -202,9 +206,11 @@ where
202206
}
203207
}
204208
Ok(item) => {
209+
println!("Pipeline response received: {:?}", item);
205210
buffer.push(item);
206211
}
207212
Err(err) => {
213+
println!("Pipeline error received: {:?}", err);
208214
if first_err.is_none() {
209215
*first_err = Some(err);
210216
}

glide-core/redis-rs/redis/src/cluster_async/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,6 +2647,12 @@ where
26472647
sub_pipeline,
26482648
pipeline_retry_strategy,
26492649
} => {
2650+
println!(
2651+
"try_request: Pipeline command received. Atomic: {}, Sub-pipeline: {}",
2652+
pipeline.is_atomic(),
2653+
sub_pipeline
2654+
);
2655+
println!("Pipeline commands:\n{:?}", pipeline);
26502656
if pipeline.is_atomic() || sub_pipeline {
26512657
// If the pipeline is atomic (i.e., a transaction) or if the pipeline is already splitted into sub-pipelines (i.e., the pipeline is already routed to a specific node), we can send it as is, with no need to split it into sub-pipelines.
26522658
Self::try_pipeline_request(

glide-core/redis-rs/redis/src/cluster_async/pipeline_routing.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,10 @@ fn process_pipeline_responses(
584584
for ((address, command_indices), response_result) in
585585
addresses_and_indices.into_iter().zip(responses)
586586
{
587+
println!(
588+
"Processing response from node: {} response {response_result:?}",
589+
address
590+
);
587591
let (server_error, retry_method) = match response_result {
588592
Ok(Ok(Response::Multiple(values))) => {
589593
// Add each response to the pipeline_responses vector at the appropriate index
@@ -640,6 +644,10 @@ fn process_pipeline_responses(
640644
// If we received a redis error, we will convert it to a ServerError and append it to the relevant indices
641645
Ok(Err(err)) => {
642646
let retry_method = err.retry_method();
647+
println!(
648+
"Pipeline command received server error from node {}: {:?}, retry method: {:?}",
649+
address, err, retry_method
650+
);
643651
(err.into(), retry_method)
644652
}
645653
// If we received a receive (connection) error, we will create a ServerError and append it to the relevant indices.
@@ -724,6 +732,10 @@ fn update_retry_map(
724732
RetryMethod::RefreshSlotsAndRetry => {
725733
// TODO: Add support for refreshing slots and retrying in pipelines
726734
// https://github.com/valkey-io/valkey-glide/issues/5226
735+
println!(
736+
"Warning: RefreshSlotsAndRetry is not yet supported for pipelines. Skipping retry for command at index {}.",
737+
index
738+
);
727739
}
728740
RetryMethod::RetryImmediately
729741
| RetryMethod::WaitAndRetry

0 commit comments

Comments
 (0)