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

[t:3008], add comments to leafentry struct describing format

git-svn-id: file:///svn/toku/tokudb@25153 c7de825b-a66e-492c-adef-691d508d4ae1
parent f6131628
...@@ -60,10 +60,27 @@ struct __attribute__ ((__packed__)) leafentry { ...@@ -60,10 +60,27 @@ struct __attribute__ ((__packed__)) leafentry {
uint32_t num_cxrs; // number of committed uxrs uint32_t num_cxrs; // number of committed uxrs
uint8_t num_pxrs; // number of provisional uxrs uint8_t num_pxrs; // number of provisional uxrs
u_int8_t key_xrs[0]; //Actual key, u_int8_t key_xrs[0]; //Actual key,
//then interesting TXNIDs //then "interesting" TXNIDs:
//then interesting lengths (type bit is MSB of length) // if provisional uxrs exist, store OUTERMOST TXNID
//then interesting data // then store committed TXNIDs, from most recently committed to least recently committed
//then other transaction records //then "interesting" lengths (length is at most 1<<31, MSB is used to store the type bit):
// if provisional uxrs exist, store length and type of INNERMOST TXNID
// then store length and type of committed TXNIDs, in same order as above
//then "interesting" data
// if provisional uxrs exist, store data for INNERMOST TXNID
// then store data for committed TXNIDs
//if provisional uxrs still exist (that is, num_puxrs > 1, so INNERMOST provisional != OUTERMOST provisional):
// for OUTERMOST provisional TXNID:
// 1 byte: store type
// 4 bytes: length (if type is INSERT)
// data
// for rest of provisional stack, from outermost to innermost, but NOT including innermost:
// 8 bytes: TXNID
// 1 byte: store type
// 4 bytes: length (if type is INSERT)
// data
// for INNERMOST provisional TXNID:
// 8 bytes: TXNID
} mvcc; // For the case where LEAFENTRY->type is LE_MVCC } mvcc; // For the case where LEAFENTRY->type is LE_MVCC
} u; } u;
}; };
......
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