Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Error Duing redis cluster rebalance operation. #3011

Open
tbbream opened this issue Oct 16, 2023 · 2 comments
Open

Type Error Duing redis cluster rebalance operation. #3011

tbbream opened this issue Oct 16, 2023 · 2 comments
Labels
bug Bug

Comments

@tbbream
Copy link
Contributor

tbbream commented Oct 16, 2023

Version: What redis-py and what redis version is the issue happening on?
4.5.3

But this error appears to exist on all versions of the client library

Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)
Python 3.10 on ubuntu docker image

Description: Description of your issue, stack traces from errors and code that reproduces the issue

During our cluster rebalancing, calls made using the SET command with the GET option result in failures. The redis cluster gets an asking command, but forwards the original options to the parsing, which result in a type error.

TypeError: bool_ok() got an unexpected keyword argument 'get'
  File "root/event_processing/unique_service/server/server/interceptors.py", line 51, in intercept
    result = method(request_or_iterator, context)
  File "root/event_processing/unique_service/server/monitoring.py", line 218, in wrapper
    return func(*args, **kwargs)
  File "root/event_processing/unique_service/server/server/routers.py", line 68, in RecordBatch
    responses = self.unique_service.record_or_get_event_batch(unique_service_requests)
  File "root/event_processing/unique_service/server/monitoring.py", line 218, in wrapper
    return func(*args, **kwargs)
  File "root/event_processing/unique_service/server/services/unique.py", line 312, in record_or_get_event_batch
    active_results = self._active_record_batch(active_requests)
  File "root/event_processing/unique_service/server/services/unique.py", line 158, in _active_record_batch
    response_batch = self.active.record_or_get_event_batch(
  File "root/event_processing/unique_service/server/monitoring.py", line 218, in wrapper
    return func(*args, **kwargs)
  File "root/event_processing/unique_service/server/repository/active.py", line 203, in record_or_get_event_batch
    return [self.record_or_get_event(request) for request in request_batch]
  File "root/event_processing/unique_service/server/repository/active.py", line 203, in <listcomp>
    return [self.record_or_get_event(request) for request in request_batch]
  File "root/event_processing/unique_service/server/monitoring.py", line 218, in wrapper
    return func(*args, **kwargs)
  File "root/event_processing/unique_service/server/repository/active.py", line 252, in record_or_get_event
    result = self._get_redis_cluster().set(
  File "redis/commands/core.py", line 2302, in set
    return self.execute_command("SET", *pieces, **options)
  File "/root/.pex/venvs/88a5344e0040931bbcf0ac82f021c059eb108950/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.10/site-packages/pex-ns-pkgs/14/opentelemetry/instrumentation/redis/__init__.py", line 162, in _traced_execute_command
    response = func(*args, **kwargs)
  File "redis/cluster.py", line 1074, in execute_command
    raise e
  File "redis/cluster.py", line 1060, in execute_command
    res[node.name] = self._execute_command(node, *args, **kwargs)
  File "root/event_processing/unique_service/server/tracing_redis_cluster.py", line 65, in _traced_execute_command
    response = func(*args, **kwargs)
  File "redis/cluster.py", line 1169, in _execute_command
    raise e
  File "redis/cluster.py", line 1106, in _execute_command
    redis_node.parse_response(connection, "ASKING", **kwargs)
  File "redis/client.py", line 1285, in parse_response
    return self.response_callbacks[command_name](response, **options)
@tbbream
Copy link
Contributor Author

tbbream commented Oct 16, 2023

Solution for the 5.0.0 series: #3012

@tbbream
Copy link
Contributor Author

tbbream commented Oct 16, 2023

Solution for the 4.6.0 series: #3013

@dvora-h dvora-h added the bug Bug label Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug
Projects
None yet
Development

No branches or pull requests

2 participants