Insert a ghost stub after a node is migrated away.
(&mut self, stub: GhostStub)
| 99 | |
| 100 | /// Insert a ghost stub after a node is migrated away. |
| 101 | pub fn insert(&mut self, stub: GhostStub) { |
| 102 | debug!( |
| 103 | node = %stub.node_id, |
| 104 | target_shard = stub.target_shard, |
| 105 | refcount = stub.refcount, |
| 106 | "inserted ghost stub" |
| 107 | ); |
| 108 | self.stubs.insert(stub.node_id.clone(), stub); |
| 109 | } |
| 110 | |
| 111 | /// Look up a ghost stub by node ID. |
| 112 | pub fn get(&self, node_id: &str) -> Option<&GhostStub> { |