MCPcopy
hub / github.com/lindb/lindb / Close

Method Close

kv/table/cache.go:152–161  ·  view source on GitHub ↗

Close closes reader resource and cleans cache data.

()

Source from the content-addressed store, hash-verified

150
151// Close closes reader resource and cleans cache data.
152func (c *storeCache) Close() error {
153 c.mutex.Lock()
154 defer c.mutex.Unlock()
155
156 c.cache.Purge(func(entry *cacheEntry) {
157 c.closeReader(entry)
158 metrics.TableCacheStatistics.Evict.Incr()
159 })
160 return nil
161}
162
163func (c *storeCache) closeReader(entry *cacheEntry) {
164 metrics.TableCacheStatistics.ActiveReaders.Decr()

Callers

nothing calls this directly

Calls 5

closeReaderMethod · 0.95
PurgeMethod · 0.80
LockMethod · 0.65
UnlockMethod · 0.65
IncrMethod · 0.45

Tested by

no test coverage detected