Skip to content

Conversation

@jmendezm
Copy link

@jmendezm jmendezm commented Apr 5, 2019

FIX #28 and added logs

[ADD] logs
% Redis explicitly say our slot mapping is incorrect, we need to refresh
% it
{error, <<"MOVED ", _/binary>>} ->
logger:error("eredis_cluster:handle_transaction_result <--> {error, MOVED} Result = ~",[Result]),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is an issue here? ~p

zuiderkwast added a commit to zuiderkwast/eredis_cluster that referenced this pull request Sep 17, 2020
Fixes adrienmo#28 and obsoletes PR adrienmo#29.

Retry is implemented for query, but not for query_noreply. Perhaps it should.
zuiderkwast added a commit to zuiderkwast/eredis_cluster that referenced this pull request Sep 17, 2020
Fixes adrienmo#28 and obsoletes PR adrienmo#29.

Retry is implemented for query, but not for query_noreply. Perhaps it should.
zuiderkwast added a commit to zuiderkwast/eredis_cluster that referenced this pull request Sep 17, 2020
Fixes adrienmo#28 and obsoletes PR adrienmo#29.

Retry is implemented for query, but not for query_noreply. Perhaps it should.
zuiderkwast added a commit to Nordix/eredis_cluster that referenced this pull request Sep 18, 2020
Fixes adrienmo#28 and obsoletes PR adrienmo#29.

Retry is implemented for query, but not for query_noreply. Perhaps it should.
Comment on lines +41 to +42
query(full, _Commands) ->
{error, retry};
Copy link

@zuiderkwast zuiderkwast Sep 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, eredis_cluster is using poolboy:transaction/2 which is using poolboy:checkout/3 with Block = true. Checkout can only return full when Block =:= false. Therefore, if the pool is full, the transaction fun never gets called so this PR just adds dead code.

Instead, when the pool doesn't have workers available, we get an exit:{timeout, {gen_server, call, _}} exception from poolboy:transaction/2. This is turned into {error, no_connection} by the try-catch in eredis_cluster_pool and then it triggers a refesh mappings and then a retry in eredis_cluster.

Refresh mappings isn't necessary in this case. A retry without refresh mappings would suffice. We have done it in the Nordix fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants