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

Method lookup_version_set

nodedb/src/control/gateway/plan_cache.rs:202–205  ·  view source on GitHub ↗

Look up the most recently stored `GatewayVersionSet` for a SQL key. Used by `execute_sql` for the two-phase cache lookup: check the side cache first to recover the version set, then verify it is still current before doing the full `PlanCacheKey` lookup.

(&self, sql_key: &SqlKey)

Source from the content-addressed store, hash-verified

200 /// cache first to recover the version set, then verify it is still current
201 /// before doing the full `PlanCacheKey` lookup.
202 pub fn lookup_version_set(&self, sql_key: &SqlKey) -> Option<GatewayVersionSet> {
203 let inner = self.inner.lock().unwrap_or_else(|p| p.into_inner());
204 inner.version_set_index.get(sql_key).cloned()
205 }
206
207 /// Store a `GatewayVersionSet` for a SQL key.
208 ///

Calls 2

lockMethod · 0.80
getMethod · 0.45