eiri opened a new issue #592: MRView's seq btree needs custom sorter function. URL: https://github.com/apache/couchdb/issues/592 ## Expected Behavior During work on apache/couchdb#560 it was found that there are bug in mrview's seq btree leading to inconsistent behaviour on query with `since` parameter. It is expected that when querying `view_changes_since` we should get changes feed starting from _next_ update sequence than provided at `since`. ## Current Behavior Response of `couch_mrview:view_changes_since/7` either include or exclude entry for `since` update sequence, depending on a view's key data type. ## Possible Solution The issue here is that `seq_btree` using tuples`{UpdSeq, ViewKey}` as the keys and `ViewKey` can be any mapped from JSON data type: binary, integer or boolean. We are using erlang native collision to find first key to start from, so we can't construct consistent low limit key. We need to specify custom `less` function on seq_btree creation and normalize keys in it. ## Steps to Reproduce (for bugs) Since http end-point `/{db}/_design/{ddoc}/_view_changes` not exposed at the moment it's a bit hard to reproduce without changing existing `changes_since_test_ test` suite to create view with integer keys instead of binaries. ## Context It's a low priority issue, the function in question not exposed to any interface. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
With regards, Apache Git Services
