basho / riak_kv

Riak Key/Value Store
Apache License 2.0
650 stars 233 forks source link

Joins, 2i queries and bucket types #1831

Closed martinsumner closed 1 year ago

martinsumner commented 2 years ago

The testing of 2i during cluster change operations was improved via this PR. https://github.com/basho/riak_test/pull/1354/files

However, this test now fails intermittently at this point - https://github.com/basho/riak_test/blob/develop-3.0/tests/verify_2i_handoff.erl#L118

The cause of the failure is a worker crash, for a runner running the 2i query on a particular vnode. When attempting to apply the coverage filter, it needs to chash the key .. but the key is in a typed bucket, and presumably the information about that typed bucket has not yet propagated after the join. so the bucket properties is {error, no_type} not a list of properties, and attempting to find the key function in the bucket properties fails https://github.com/basho/riak_test/blob/develop-3.0/tests/verify_2i_handoff.erl#L118.

So this looks like this has always been an issue, you cannot reliably run 2i queries during joins (although potentially only impacting typed buckets).

martinsumner commented 2 years ago

As this is an old issue surfaced through a new test, and there is no obvious quick fix, it will not be resolved as part of 3.0.10.