Handle strategy fallbacks properly #809
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, first time contributor here - without "proper" ruby background - so please advise if these few lines could be written in a more idiomatic way.
If strategy was set for server and not for client in a hash - that would lead to on_client_conflict to return a hash back. Which would in turn lead to an error in on_conflict#find_strategy because it cannot send a message to
to_sym
on a hash.We've observed this issue where we've set an
on conflict
strategy for server onUntilExecuted
which seems to do a client-only on conflict resolution. So most likely our job is not set properly - however I want to check with you whether that could be handled differently without throwing errors.If we decide to merge this PR - would it be possible to also backport it to v7.x.x?