MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / sync_delete_instance

Method sync_delete_instance

gateway/src/kv/mod.rs:507–517  ·  view source on GitHub ↗

Sync instance deletion to other nodes

(&self, instance_id: &str)

Source from the content-addressed store, hash-verified

505
506 /// Sync instance deletion to other nodes
507 pub fn sync_delete_instance(&self, instance_id: &str) -> Result<()> {
508 self.persistent.write().delete(keys::inst(instance_id))?;
509 self.ephemeral
510 .write()
511 .delete(keys::conn(instance_id, self.my_node_id))?;
512 // Delete this node's handshake record
513 self.ephemeral
514 .write()
515 .delete(keys::handshake(instance_id, self.my_node_id))?;
516 Ok(())
517 }
518
519 /// Load all instances from sync store (for initial sync on startup)
520 pub fn load_all_instances(&self) -> BTreeMap<String, InstanceData> {

Callers 1

remove_instanceMethod · 0.80

Calls 4

instFunction · 0.85
connFunction · 0.85
handshakeFunction · 0.85
writeMethod · 0.80

Tested by

no test coverage detected