Commit cf0acb16 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4431], add comments

git-svn-id: file:///svn/toku/tokudb@42767 c7de825b-a66e-492c-adef-691d508d4ae1
parent 865b81d0
...@@ -53,11 +53,11 @@ toku_create_new_brtnode ( ...@@ -53,11 +53,11 @@ toku_create_new_brtnode (
); );
/** /**
* The intent of toku_pin_brtnode(_holding_lock) is to abstract the * toku_pin_brtnode either pins a brtnode, if the operation is fast (because
* process of retrieving a node from the rest of brt.c, so that there is * a partial fetch is not required and there is no contention for the node)
* only one place where we need to worry applying ancestor messages to a * or it returns TOKUDB_TRY_AGAIN after unlocking its ancestors (using
* leaf node. The idea is for all of brt.c (search, splits, merges, * unlockers and ancestors) and bringing the necessary pieces of the node
* flushes, etc) to access a node via toku_pin_brtnode(_holding_lock) * into memory.
*/ */
int int
toku_pin_brtnode( toku_pin_brtnode(
...@@ -75,10 +75,11 @@ toku_pin_brtnode( ...@@ -75,10 +75,11 @@ toku_pin_brtnode(
); );
/** /**
* Pin a brtnode off the client thread, which means * Unfortunately, this function is poorly named
* it is pinned without the ydb lock being held. * as over time, client threads have also started
* As a result, unlike toku_pin_brtnode, we cannot apply ancestor * calling this function.
* messages. * This function returns a pinned brtnode to the caller.
* Unlike toku_pin_brtnode, this function blocks until the node is pinned.
*/ */
void void
toku_pin_brtnode_off_client_thread( toku_pin_brtnode_off_client_thread(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment