MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / push

Method push

nodedb/src/bridge/slab.rs:170–176  ·  view source on GitHub ↗

Push a slab ID for return (called by Control Plane). Returns `true` if pushed successfully, `false` if queue is full.

(&self, id: SlabId)

Source from the content-addressed store, hash-verified

168 ///
169 /// Returns `true` if pushed successfully, `false` if queue is full.
170 pub fn push(&self, id: SlabId) -> bool {
171 let packed = ((id.core_id as u32) << 16) | (id.page_index as u32);
172 let pos = self.write_pos.fetch_add(1, Ordering::Relaxed);
173 let idx = (pos % self.capacity) as usize;
174 self.buffer[idx].store(packed, Ordering::Release);
175 true
176 }
177
178 /// Drain all returned slab IDs (called by Data Plane on each tick).
179 ///

Callers 15

format_bannerFunction · 0.45
recoverMethod · 0.45
pending_segmentsMethod · 0.45
freeMethod · 0.45
drainMethod · 0.45
return_queue_push_drainFunction · 0.45
with_resolverMethod · 0.45
poll_responsesMethod · 0.45
prune_row_groupsFunction · 0.45
batches_to_document_rowsFunction · 0.45
list_parquet_filesMethod · 0.45
create_base_snapshotFunction · 0.45

Calls 1

storeMethod · 0.45