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

Method remove_buffer

nodedb/src/event/cdc/router.rs:254–259  ·  view source on GitHub ↗

Remove a buffer when a stream is dropped.

(&self, tenant_id: u64, stream_name: &str)

Source from the content-addressed store, hash-verified

252
253 /// Remove a buffer when a stream is dropped.
254 pub fn remove_buffer(&self, tenant_id: u64, stream_name: &str) {
255 let key = (tenant_id, stream_name.to_string());
256 let mut buffers = self.buffers.write().unwrap_or_else(|p| p.into_inner());
257 buffers.remove(&key);
258 self.lag_warner.remove_stream(tenant_id, stream_name);
259 }
260
261 /// Snapshot of all buffer stats (for SHOW CHANGE STREAMS).
262 pub fn buffer_stats(&self) -> Vec<BufferStats> {

Callers 4

deleteFunction · 0.80
drop_change_streamFunction · 0.80
drop_topicFunction · 0.80
remove_buffer_on_dropFunction · 0.80

Calls 4

to_stringMethod · 0.80
remove_streamMethod · 0.80
writeMethod · 0.45
removeMethod · 0.45

Tested by 1

remove_buffer_on_dropFunction · 0.64