nickva commented on PR #5619:
URL: https://github.com/apache/couchdb/pull/5619#issuecomment-3161881531
To notice the difference between main and PR can also try this trace pattern:
#### MAIN
`http $DB/db/_all_docs'?limit=0'`
=>
```
> recon_trace:calls({couch_file, pread_term, fun([_, _]) ->
message(caller_line()) end}, 1000).
1
19:4:44.127475 <0.5659.0> couch_file:pread_term(<0.1778.0>, 0)
{couch_bt_engine,get_header_term,3,{"src/couch_bt_engine.erl",1198}}
19:4:44.128057 <0.5659.0> couch_file:pread_term(<0.1778.0>, 0)
{couch_bt_engine,get_header_term,3,{"src/couch_bt_engine.erl",1198}}
19:4:44.128553 <0.5659.0> couch_file:pread_term(<0.1778.0>, 94860)
{couch_btree,get_node,2,{"src/couch_btree.erl",474}}
19:4:44.129022 <0.5659.0> couch_file:pread_term(<0.1778.0>, 49484)
{couch_btree,get_node,2,{"src/couch_btree.erl",474}}
```
`couch_btree:get_node/2` are expected but `get_header_terms` should be
cached...
#### WITH PR
```
> recon_trace:calls({couch_file, pread_term, fun([_, _]) ->
message(caller_line()) end}, 1000).
1
19:8:11.302801 <0.4886.0> couch_file:pread_term(<0.949.0>, 86369)
{couch_btree,get_node,2,{"src/couch_btree.erl",474}}
19:8:11.303378 <0.4886.0> couch_file:pread_term(<0.949.0>, 82175)
{couch_btree,get_node,2,{"src/couch_btree.erl",474}}
```
Just `couch_btree:get_node/2` calls, as expected.
--
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]