![]() |
Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
|

Public Member Functions | |
| EvictionQueue (const vector< FileBufferType > &file_buffer_types_p) | |
| bool | AddToEvictionQueue (BufferEvictionNode &&node) |
| bool | TryDequeueWithLock (BufferEvictionNode &node) |
| Tries to dequeue an element from the eviction queue, but only after acquiring the purge queue lock. | |
| void | Purge () |
| Garbage collect dead nodes in the eviction queue. | |
| template<typename FN> | |
| void | IterateUnloadableBlocks (FN fn) |
| void | IncrementDeadNodes () |
| Increment the dead node counter in the purge queue. | |
| void | DecrementDeadNodes () |
| Decrement the dead node counter in the purge queue. | |
| bool | HasFileBufferType (const FileBufferType &type) const |
Public Attributes | |
| const vector< FileBufferType > | file_buffer_types |
| The type of the buffers in this queue and helper function (both for verification only). | |
| eviction_queue_t | q |
| The concurrent queue. | |
| atomic< idx_t > | debug_eviction_queue_sleep |
| Debug-only: atomic holding the eviction queue sleep setting. | |
Private Member Functions | |
| void | PurgeIteration (const idx_t purge_size) |
| Bulk purge dead nodes from the eviction queue. Then, enqueue those that are still alive. | |
Private Attributes | |
| atomic< idx_t > | evict_queue_insertions |
| Total number of insertions into the eviction queue. This guides the schedule for calling PurgeQueue. | |
| atomic< idx_t > | total_dead_nodes |
| mutex | purge_lock |
| vector< BufferEvictionNode > | purge_nodes |
| A pre-allocated vector of eviction nodes. We reuse this to keep the allocation overhead of purges small. | |
Static Private Attributes | |
| static constexpr idx_t | INSERT_INTERVAL = 4096 |
| We trigger a purge of the eviction queue every INSERT_INTERVAL insertions. | |
| static constexpr idx_t | PURGE_SIZE_MULTIPLIER = 2 |
| We multiply the base purge size by this value. | |
| static constexpr idx_t | EARLY_OUT_MULTIPLIER = 4 |
| static constexpr idx_t | ALIVE_NODE_MULTIPLIER = 4 |
|
inlineexplicit |
| bool duckdb::EvictionQueue::AddToEvictionQueue | ( | BufferEvictionNode && | node | ) |
Add a buffer handle to the eviction queue. Returns true, if the queue is ready to be purged, and false otherwise.
| bool duckdb::EvictionQueue::TryDequeueWithLock | ( | BufferEvictionNode & | node | ) |
Tries to dequeue an element from the eviction queue, but only after acquiring the purge queue lock.
| void duckdb::EvictionQueue::Purge | ( | ) |
Garbage collect dead nodes in the eviction queue.

| void duckdb::EvictionQueue::IterateUnloadableBlocks | ( | FN | fn | ) |
|
inline |
Increment the dead node counter in the purge queue.

|
inline |
Decrement the dead node counter in the purge queue.
|
inline |
|
private |
Bulk purge dead nodes from the eviction queue. Then, enqueue those that are still alive.

|
staticconstexprprivate |
We multiply the purge size by this value to determine early-outs. This is the minimum queue size. We never purge below this point.
|
staticconstexprprivate |
We multiply the approximate alive nodes by this value to test whether our total dead nodes exceed their allowed ratio. Must be greater than 1.
|
private |
Total dead nodes in the eviction queue. There are two scenarios in which a node dies: (1) we destroy its block handle, or (2) we insert a newer version into the eviction queue.
|
private |
Locked, if a queue purge is currently active or we're trying to forcefully evict a node. Only lets a single thread enter the purge phase.