Re: [PR] Optimise fabric:all_dbs() [couchdb]

2024-04-24 Thread via GitHub
nickva merged PR #5037: URL: https://github.com/apache/couchdb/pull/5037 -- 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:

Re: [PR] Optimise fabric:all_dbs() [couchdb]

2024-04-24 Thread via GitHub
jaydoane commented on code in PR #5037: URL: https://github.com/apache/couchdb/pull/5037#discussion_r1578611908 ## src/mem3/src/mem3_shards.erl: ## @@ -176,6 +177,23 @@ fold(Fun, Acc) -> couch_db:close(Db) end. +fold_dbs(<>, Fun, Acc0) when is_function(Fun, 2)

[PR] Optimise fabric:all_dbs() [couchdb]

2024-04-24 Thread via GitHub
nickva opened a new pull request, #5037: URL: https://github.com/apache/couchdb/pull/5037 Previous version was awfully inefficient: we only need the dbname, but we opened each document body, parsed the shards out of it, generated Q*N shards, then put them in a list and usorted them back