nickva edited a comment on issue #3773: URL: https://github.com/apache/couchdb/issues/3773#issuecomment-941963658
I think the issue is in the logic where we [match reduce rows by keys](https://github.com/apache/couchdb/blob/3.x/src/fabric/src/fabric_view.erl#L245). In case when there are keys which are effectively equivalent under unicode collation rules, the worker might return the 69cc82 row with value 2 already reduced but if the requested key is c3ae then it won't be found and we'd get 0 rows in the result. Instead, we would like it to compare the rows in the row dict not by exact matching, but using the same collation algorithm as the one used when building the view. I made an attempt here https://github.com/apache/couchdb/pull/3783 With that PR and my altered reproducer [script](https://gist.github.com/nickva/e351e678fc10d3b5424de44be992703c) I get: ``` --- c h a i n e --- {"rows":[ {"key":["file","chaîne"],"value":2} ]} --- c h a i ^ n e --- {"rows":[ {"key":["file","chaîne"],"value":2} ]} ``` For both q=1 and q=2 cases -- 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]
