@@ -157,36 +157,49 @@ class ftnode_pivot_keys {
157157
158158// TODO: class me up
159159struct ftnode {
160- MSN max_msn_applied_to_node_on_disk; // max_msn_applied that will be written to disk
160+ // max_msn_applied that will be written to disk
161+ MSN max_msn_applied_to_node_on_disk;
161162 unsigned int flags;
162- BLOCKNUM blocknum; // Which block number is this node?
163- int layout_version; // What version of the data structure?
164- int layout_version_original;// different (<) from layout_version if upgraded from a previous version (useful for debugging)
165- int layout_version_read_from_disk; // transient, not serialized to disk, (useful for debugging)
166- uint32_t build_id; // build_id (svn rev number) of software that wrote this node to disk
167- int height; /* height is always >= 0. 0 for leaf, >0 for nonleaf. */
168- int dirty;
163+ // Which block number is this node?
164+ BLOCKNUM blocknum;
165+ // What version of the data structure?
166+ int layout_version;
167+ // different (<) from layout_version if upgraded from a previous version
168+ // (useful for debugging)
169+ int layout_version_original;
170+ // transient, not serialized to disk, (useful for debugging)
171+ int layout_version_read_from_disk;
172+ // build_id (svn rev number) of software that wrote this node to disk
173+ uint32_t build_id;
174+ // height is always >= 0. 0 for leaf, >0 for nonleaf.
175+ int height;
176+ int dirty;
169177 uint32_t fullhash;
178+ // current count of rows add or removed as a result of message application
179+ // to this node as a basement, irrelevant for internal nodes, gets reset
180+ // when node is undirtied. Used to back out tree scoped LRC id node is
181+ // evicted but not persisted
182+ int64_t logical_rows_delta;
170183
171- // for internal nodes, if n_children==fanout+1 then the tree needs to be rebalanced.
172- // for leaf nodes, represents number of basement nodes
184+ // for internal nodes, if n_children==fanout+1 then the tree needs to be
185+ // rebalanced. for leaf nodes, represents number of basement nodes
173186 int n_children;
174187 ftnode_pivot_keys pivotkeys;
175188
176- // What's the oldest referenced xid that this node knows about? The real oldest
177- // referenced xid might be younger, but this is our best estimate. We use it
178- // as a heuristic to transition provisional mvcc entries from provisional to
179- // committed (from implicity committed to really committed).
189+ // What's the oldest referenced xid that this node knows about? The real
190+ // oldest referenced xid might be younger, but this is our best estimate.
191+ // We use it as a heuristic to transition provisional mvcc entries from
192+ // provisional to committed (from implicity committed to really committed).
180193 //
181- // A better heuristic would be the oldest live txnid, but we use this since it
182- // still works well most of the time, and its readily available on the inject
183- // code path.
194+ // A better heuristic would be the oldest live txnid, but we use this since
195+ // it still works well most of the time, and its readily available on the
196+ // inject code path.
184197 TXNID oldest_referenced_xid_known;
185198
186199 // array of size n_children, consisting of ftnode partitions
187- // each one is associated with a child
188- // for internal nodes, the ith partition corresponds to the ith message buffer
189- // for leaf nodes, the ith partition corresponds to the ith basement node
200+ // each one is associated with a child for internal nodes, the ith
201+ // partition corresponds to the ith message buffer for leaf nodes, the ith
202+ // partition corresponds to the ith basement node
190203 struct ftnode_partition *bp;
191204 struct ctpair *ct_pair;
192205};
@@ -199,7 +212,6 @@ struct ftnode_leaf_basement_node {
199212 MSN max_msn_applied; // max message sequence number applied
200213 bool stale_ancestor_messages_applied;
201214 STAT64INFO_S stat64_delta; // change in stat64 counters since basement was last written to disk
202- int64_t logical_rows_delta;
203215};
204216typedef struct ftnode_leaf_basement_node *BASEMENTNODE;
205217
0 commit comments