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

add missing function clause repair_keys_range in convert_fold #1839

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

hmmr
Copy link
Contributor

@hmmr hmmr commented Nov 30, 2022

This is to unbreak aae_fold for repair_keys_range.

In collaboration with @pjaclark.

@martinsumner
Copy link
Contributor

As I understand it convert_fold is only used normally via riak_client:aae_fold/1. However this is broken too:

riak_kv/src/riak_client.erl

Lines 905 to 911 in 9ca7184

Q0 = riak_kv_clusteraae_fsm:convert_fold(Query),
case riak_kv_clusteraae_fsm:is_valid_fold(Q0) of
true ->
riak_kv_clusteraae_fsm_sup:start_clusteraae_fsm(Node,
[{raw, ReqId, Me},
[Query, TimeOut]]),
wait_for_fold_results(ReqId, TimeOut);

The Q0 is used in the validity check, but not in the actual query (where Query is used).

Do you want to make this quick fix as part of this PR, and pass Q0 through to the query?

I have a riak_test ready. This test extends verify_aaefold_rangerepair so that it works via riak_client when depending on the date conversion: https://github.com/basho/riak_test/blob/mas-1839-convertfold/tests/verify_aaefold_rangerepair.erl.

If you update the PR with the second fix, the test should pass

@martinsumner martinsumner self-requested a review December 1, 2022 13:39
@martinsumner martinsumner merged commit 7da0112 into basho:develop-3.0 Dec 1, 2022
@hmmr hmmr deleted the patch-1 branch December 2, 2022 12:37
martinsumner pushed a commit that referenced this pull request Dec 19, 2022
* add missing function clause repair_keys_range in convert_fold, to unbreak aae_fold for that case

* thread converted aae_fold query in riak_client, to complete prev commit
martinsumner added a commit that referenced this pull request Dec 19, 2022
* Do not crash when object's contents is an empty list (#1837)

* Add test to illustrate issue

* Do not crash when object's contents is an empty list

* add missing function clause repair_keys_range in convert_fold (#1839)

* add missing function clause repair_keys_range in convert_fold, to unbreak aae_fold for that case

* thread converted aae_fold query in riak_client, to complete prev commit

* Change the default PR value from 0 to default (#1836)

This means that get requests will use bucket-type level Primary Read settings

Co-authored-by: Peter Tihanyi <peter.tihanyi@otpbank.hu>

* Mas i1121 reip3 (#1838)

* Add reip/3

To allow for reip without loading the riak_core application

* Use alternate name

* Update riak_kv_console.erl

* Update riak_kv_console.erl

* reip_manual inputs are atoms

* Add warning to update riak.conf file after reip

* Make clear where attention is required

And return 'ok' to make clear the op was successful

* Update rebar.config

* Update log (#1840)

Make situation clearer in log

Rather than change behaviour, just make it clear that the warning can be ignored when shutting down.  This should avoid unnecessary concern.

* Update Readme, remove mercurial refs

Co-authored-by: Enrique Fernández <efcasado@gmail.com>
Co-authored-by: Andrei Zavada <johnhommer@gmail.com>
Co-authored-by: Peter Tihanyi <tihi@systream.hu>
Co-authored-by: Peter Tihanyi <peter.tihanyi@otpbank.hu>
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.

None yet

2 participants