Github user iilyak commented on the issue:
https://github.com/apache/couchdb-couch/pull/220
@eiri: I am concerned that in some case we change `2 -> 3` and in other `2
-> 4`. I understand the reason for this though. However strictly speaking
couch_file process is not a user of a db. Wouldn't it be better to change
count_users function to account for additional monitors? Following works
locally:
```
count_users(DbName) ->
{ok, Db} = couch_db:open_int(DbName, [?ADMIN_CTX]),
{monitored_by, Monitors} = erlang:process_info(Db#db.main_pid,
monitored_by),
+ CouchFiles = [P || P <- Monitors, couch_file:process_info(P) =/=
undefined],
ok = couch_db:close(Db),
- length(lists:usort(Monitors) -- [self()]).
+ length(lists:usort(Monitors) -- [self() | CouchFiles]).
```
---
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.
---