You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "nickva (via GitHub)" <gi...@apache.org> on 2025/10/12 07:14:03 UTC
[PR] Optimize purge [couchdb]
nickva opened a new pull request, #5697:
URL: https://github.com/apache/couchdb/pull/5697
Optimizations consist in 3 improvements:
* In fabric_doc_purge use maps instead dicts. During setup avoid traversing the requests and uuids too many times. Instead, generate more in the same iteration: when creating requests, generate the response structure; when generating worker uuids, generate uuids counts.
* Reduce purge UUID sizes by half by using binary values instead hex encoded values. These UUIDs are generated internally and are never returned or accepted through the API so we don't have to hex-encode them.
* Add UUID v7 as a separate commit and use UUID v7 for purge UUIDs. Generate them directly instead of going through
a single gen_server bottleneck like before. They are standard, and yet preserve the same nice sequential prefix property which help when these are used for B-tree IDs (which they are in this case).
Expand the test suite a bit, add at least one end-to-end test and a few more test functions. The coverage increases from about 80% to almost 100%.
Add a few comments with the shape of various data structures as a reminder for the future.
Purging 100k conflicted docs on a q=1,n=1 db improved from 106 sec to 87 sec which is about 18%
--
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
Re: [PR] Optimize purge and add UUID v7 [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva merged PR #5697:
URL: https://github.com/apache/couchdb/pull/5697
--
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