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

Method handle_array_flush

nodedb/src/data/executor/dispatch/array/mutate.rs:73–91  ·  view source on GitHub ↗
(
        &mut self,
        task: &ExecutionTask,
        array_id: &ArrayId,
        wal_lsn: u64,
    )

Source from the content-addressed store, hash-verified

71 }
72
73 pub(in crate::data::executor) fn handle_array_flush(
74 &mut self,
75 task: &ExecutionTask,
76 array_id: &ArrayId,
77 wal_lsn: u64,
78 ) -> Response {
79 // The Control Plane allocated `wal_lsn` from the central WAL
80 // writer; the engine just stamps it as the segment's flush
81 // watermark.
82 if let Err(e) = self.array_engine.flush(array_id, wal_lsn) {
83 return self.response_error(
84 task,
85 ErrorCode::Internal {
86 detail: format!("array flush: {e}"),
87 },
88 );
89 }
90 encode_count_response(self, task, "flushed", 1)
91 }
92
93 /// `ArrayOp::DropArray` handler — broadcast on `DROP ARRAY` after
94 /// the Control-Plane catalog mutation. Releases the per-core store

Callers 1

dispatch_arrayMethod · 0.80

Calls 3

encode_count_responseFunction · 0.85
response_errorMethod · 0.80
flushMethod · 0.45

Tested by

no test coverage detected