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

Function record_event

nodedb/src/event/consumer_helpers.rs:47–59  ·  view source on GitHub ↗

Process a single event. Dispatch point for trigger matching, CDC, etc.

(core_id: usize, event: &WriteEvent, metrics: &CoreMetrics)

Source from the content-addressed store, hash-verified

45
46/// Process a single event. Dispatch point for trigger matching, CDC, etc.
47pub fn record_event(core_id: usize, event: &WriteEvent, metrics: &CoreMetrics) {
48 metrics.record_process_for_tenant(event.lsn.as_u64(), event.sequence, event.tenant_id.as_u64());
49
50 trace!(
51 core_id,
52 seq = event.sequence,
53 collection = %event.collection,
54 op = %event.op,
55 source = %event.source,
56 lsn = event.lsn.as_u64(),
57 "event consumed"
58 );
59}
60
61/// Flush watermark to redb if the flush interval has elapsed.
62pub fn maybe_flush_watermark(

Callers 3

drain_ring_bufferFunction · 0.85
consumer_loopFunction · 0.85
gap_detectionFunction · 0.85

Calls 2

as_u64Method · 0.45

Tested by 1

gap_detectionFunction · 0.68