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

Conflict resolver not being passed to Fetch/Store-ValueCommand [JIRA: CLIENTS-565] #21

Closed
tegioz opened this issue Sep 4, 2015 · 2 comments · Fixed by #22
Closed

Conflict resolver not being passed to Fetch/Store-ValueCommand [JIRA: CLIENTS-565] #21

tegioz opened this issue Sep 4, 2015 · 2 comments · Fixed by #22

Comments

@tegioz
Copy link

tegioz commented Sep 4, 2015

Conflict resolver is not being passed from the builder to the command, so it's never being called.

return &FetchValueCommand{protobuf: builder.protobuf}, nil

Should be:

return &FetchValueCommand{protobuf: builder.protobuf, resolver: builder.resolver}, nil

return &StoreValueCommand{value: builder.value, protobuf: builder.protobuf}, nil

Should be:

return &StoreValueCommand{value: builder.value, protobuf: builder.protobuf, resolver: builder.resolver}, nil

I was wondering also if it would be possible to make the call to the resolver only when there are at least 2 values, as it seems that often -when there are no siblings- the call might not be necessary.

if cmd.resolver != nil {
response.Values = cmd.resolver.Resolve(response.Values)
}

if cmd.resolver != nil {
response.Values = cmd.resolver.Resolve(response.Values)
}

@Basho-JIRA Basho-JIRA changed the title Conflict resolver not being passed to Fetch/Store-ValueCommand Conflict resolver not being passed to Fetch/Store-ValueCommand [JIRA: CLIENTS-565] Sep 4, 2015
@lukebakken
Copy link
Contributor

Hi Sergio,

Thanks for finding that, I'll get it resolved soon.

I checked the Node.js client and Java client, and the resolver, if present, is always called, no matter the result count. I'll leave the behavior the same in the Go client to remain consistent.

@tegioz
Copy link
Author

tegioz commented Sep 4, 2015

Hi Luke,

I understand, that makes sense, thanks.

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

Successfully merging a pull request may close this issue.

3 participants