nickva opened a new pull request, #6043:
URL: https://github.com/apache/couchdb/pull/6043
Previously, when fetching the `_time_seq` histogram with one node in mm we
could get a function_clause error as show here: [0]
`_time_seq` and a few other operations use `all` as fabric ring option. When
using that option the accumulator used by fabric_ring uses a simplified 2-tuple
shape `{Shard, Result}` as opposed to a 3-tuple `{Range, Shard, Result}` used
in most other cases [1]. Because of that when checking if progress is possible
we didn't correctly handle the case of 2-tuples and always expected a 3-tuple
format.
The fix is to expect a 2-tuple and 3-tuple and handle both.
[0]
```
function_clause#012 [
<<"fabric_ring:-range_bounds/2-fun-0-/1 L274">>,
<<"lists:map/2 L2077">>,
<<"fabric_ring:range_bounds/2 L274">>,
<<"fabric_ring:handle_error/4 L80">>,
<<"fabric_time_seq:histogram_handle_message/3 L101">>
...
]
```
[1] The reason for both is a 2-tuple and 3-tuple is that in the default case
we care to record how many responses arrived per range interval and also
`mem3_util:get_ring/3` works with ranges only. For `all` or `{any, ...}`
options we don't really need to track per range results, so we keep the
accumulator simpler a bit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]