-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Hi there,
I have a conceptual problem with how the _send_command_parse_response is being grouped:
Lines 590 to 595 in ea01a30
| def _send_command_parse_response(self, conn, command_name, *args, **options): | |
| """ | |
| Send a command and parse the response | |
| """ | |
| conn.send_command(*args, **options) | |
| return self.parse_response(conn, command_name, **options) |
My issue is that this method is called inside a retry mechanism:
Lines 623 to 628 in ea01a30
| return conn.retry.call_with_retry( | |
| lambda: self._send_command_parse_response( | |
| conn, command_name, *args, **options | |
| ), | |
| lambda error: self._disconnect_raise(conn, error), | |
| ) |
Which means that if the Redis container goes down after send_command and before parse_response, the entire _send_command_parse_response will be retried. This means that any command with side effects (such as XADD) could be executed twice instead of just once, leading to unintended duplication.
Would love to hear thoughts on potential fixes for this issue. Let me know if you need any additional details!
Metadata
Metadata
Assignees
Labels
No labels