You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/06/20 22:34:07 UTC
[GitHub] [couchdb] nickva opened a new pull request, #4075: Fix couch_debug:opened_files* functions
nickva opened a new pull request, #4075:
URL: https://github.com/apache/couchdb/pull/4075
They relied on scanning async IO thread pool ports (`efile`) before . That only worked in Erlang versions < 21. Since then file IO was moved to dirty schedulers so listing `efile` ports doesn't yield any useful results.
The partial fix is iterate through `processes()` and pick out the ones for which couch_file has put anything into the process dictionary. This will skip non-couch-file files but it's probably still better than nothing.
--
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: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] nickva commented on pull request #4075: Fix couch_debug:opened_files* functions
Posted by GitBox <gi...@apache.org>.
nickva commented on PR #4075:
URL: https://github.com/apache/couchdb/pull/4075#issuecomment-1160877467
Example of usage:
```
(node1@127.0.0.1)1> couch_debug:opened_files().
[{<0.417.0>,
{file_descriptor,prim_file,
#{handle => #Ref<0.3584905603.118358043.227800>,
owner => <0.417.0>,r_ahead_size => 0,
r_buffer => #Ref<0.3584905603.118358017.227799>}},
"/Users/nvatama/asf/dev/lib/node1/data/_nodes.couch"},
{<0.434.0>,
{file_descriptor,prim_file,
#{handle => #Ref<0.3584905603.118358046.228058>,
owner => <0.434.0>,r_ahead_size => 0,
r_buffer => #Ref<0.3584905603.118358017.227932>}},
"/Users/nvatama/asf/dev/lib/node1/data/_dbs.couch"},
...
```
```
(node1@127.0.0.1)3> couch_debug:opened_files_contains("_replicator").
[{<0.790.0>,
{file_descriptor,prim_file,
#{handle => #Ref<0.3584905603.118358045.227768>,
owner => <0.790.0>,r_ahead_size => 0,
r_buffer => #Ref<0.3584905603.118358018.227921>}},
"/Users/nvatama/asf/dev/lib/node1/data/shards/00000000-7fffffff/_replicator.1655761414.couch"},
```
```
couch_debug:opened_files_by_regexp(".*_replicator.*").
[{<0.790.0>,
{file_descriptor,prim_file,
#{handle => #Ref<0.3584905603.118358045.227768>,
owner => <0.790.0>,r_ahead_size => 0,
r_buffer => #Ref<0.3584905603.118358018.227921>}},
"/Users/nvatama/asf/dev/lib/node1/data/shards/00000000-7fffffff/_replicator.1655761414.couch"},
```
--
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: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] nickva merged pull request #4075: Fix couch_debug:opened_files* functions
Posted by GitBox <gi...@apache.org>.
nickva merged PR #4075:
URL: https://github.com/apache/couchdb/pull/4075
--
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: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org