enum lfds700_btree_au_query
Jump to navigation
Jump to search
Source File
└───liblfds700 └───inc └───liblfds700 lfds700_btree_addonly_unbalanced.h
Enum
enum lfds700_btree_au_query { LFDS700_BTREE_AU_QUERY_GET_POTENTIALLY_INACCURATE_COUNT, LFDS700_BTREE_AU_QUERY_SINGLETHREADED_VALIDATE };
Values
LFDS700_BTREE_AU_QUERY_GET_POTENTIALLY_INACCURATE_COUNT
- Performs a single-threaded count of the number of elements in the btree. The count will only be guaranteed to be accurate if no other threads are adding elements to the tree during the count. If other threads are adding elements, they will only be counted if the tree walk which is counting elements has not yet reached those new elements.
LFDS700_BTREE_AU_QUERY_SINGLETHREADED_VALIDATE
- Validates the btree. Performs an in-order walk, checking every element is larger than the preceeding element. Additionally, if given an expected range of the number of elements in the tree, counts the number of elements in the tree and checks they fall within the expected range. The validation walk is thread-safe, but the count is not and if other threads are adding elements to the tree, they will not necessarily be counted, and so this could then lead to the count being improperly outside the count range specified by the caller.
Notes
This enum is used by the btree query function, lfds700_btree_au_query.