Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Questions about the lockfree utilities

52 views
Skip to first unread message

wolfk...@gmail.com

unread,
Jan 3, 2025, 11:07:01 AMJan 3
to wiredtiger-users
Hi, all.
Recently, I took a look at wiredTiger 12.0 official document and found some details(https://source.wiredtiger.com/develop/arch-toc-int-wt-dev.html) about the internal lockfree utilities, such as the slotted-array, generation-management, the WwS correctness provement, etc.
The document is very important and from the new doc I finally got some new and better understandings of wiredTiger's source code.
I once ever took several days try to understand wt's lockfree patterns but got little progress until recently I found the document.

My question is
1. From where, the utilities(slotted-array, generation&hazardpoint management, WwS, ticket-rwlock) comes? Maybe some code(or ideas) is from Postgres or innodb? Are there any papers refering these utilities?
2. Wt's btree implementation still lacks a document to declare its 'concurrency control protocol', will you release more details in the future?


I've to admit that wt is better than rocksdb in many cases, expecially in cloud, cloud users have complex workloads and wt suits better. Rocksdb's source code is easier to understand and modify, it's why rocksdb is more spread.

Andrew Morton

unread,
Jan 7, 2025, 11:12:42 PMJan 7
to wiredtig...@googlegroups.com
Hi, thanks for your interest in WiredTiger!

We're glad to hear you found the documentation useful. It was the product of a code review to better understand lockfree patterns found in WiredTiger. Many of the terms (WwS, Slotted array) have been invented to give WiredTiger developers a common language for describing the existing code.

We didn't trace these patterns to their origin during the review so there aren't any papers I can provide, but in many cases these features behave similarly (but not always identically) to established lockfree patterns. For example our use of hazard pointers and ticket locks, and our generations logic is very similar to Epoch-based reclamation

At the moment there are no plans to create further documentation, but documenting the BTree's concurrency control is a good idea. I've created WT-13976 to track this but I can't speak to when or if the work is scheduled.

Please let me know if you have further questions,
Andrew

--
You received this message because you are subscribed to the Google Groups "wiredtiger-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wiredtiger-use...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wiredtiger-users/3a07c266-bf82-489a-aef8-8f03c23ff119n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages