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

Method handle_array_drop

nodedb/src/data/executor/dispatch/array/mutate.rs:99–113  ·  view source on GitHub ↗

`ArrayOp::DropArray` handler — broadcast on `DROP ARRAY` after the Control-Plane catalog mutation. Releases the per-core store and removes the on-disk segment directory so a subsequent `CREATE ARRAY` with the same name (and possibly a different schema) starts from a clean slate. Idempotent: silently succeeds when this core never opened the array.

(
        &mut self,
        task: &ExecutionTask,
        array_id: &ArrayId,
    )

Source from the content-addressed store, hash-verified

97 /// schema) starts from a clean slate. Idempotent: silently
98 /// succeeds when this core never opened the array.
99 pub(in crate::data::executor) fn handle_array_drop(
100 &mut self,
101 task: &ExecutionTask,
102 array_id: &ArrayId,
103 ) -> Response {
104 if let Err(e) = self.array_engine.drop_array(array_id) {
105 return self.response_error(
106 task,
107 ErrorCode::Internal {
108 detail: format!("array drop: {e}"),
109 },
110 );
111 }
112 encode_count_response(self, task, "dropped", 1)
113 }
114
115 pub(in crate::data::executor) fn handle_array_compact(
116 &mut self,

Callers 1

dispatch_arrayMethod · 0.80

Calls 3

encode_count_responseFunction · 0.85
drop_arrayMethod · 0.80
response_errorMethod · 0.80

Tested by

no test coverage detected