Github user iilyak commented on the issue:
https://github.com/apache/couchdb-fabric/pull/54
We pass Args as a whole to `handle_message/3` in `#collector.query_args`
field. We also pass Args to `fabric_rpc:reduce_view/3` earlier. So the
`direction` parameter get passed down the chain:
* `fabric_rpc:reduce_view/3`
* `couch_mrview:query_view/6`
* `couch_mrview:red_fold/5`
`couch_mrview:red_fold/5` uses
[`couch_mrview_util:key_opts/2`](https://github.com/apache/couchdb-couch-mrview/blob/master/src/couch_mrview.erl#L563).
Which reorders `start_key`/`end_key` depending on `direction`.
I think `direction=Dir` was added for debugging and was not removed before
submitting PR.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---