invalidatePosCache clears the cached position so the next call to Pos() recomputes it from disk. Call this when L0 LTX files are deleted or when the L0 directory is cleared.
()
| 593 | // recomputes it from disk. Call this when L0 LTX files are deleted or |
| 594 | // when the L0 directory is cleared. |
| 595 | func (db *DB) invalidatePosCache() { |
| 596 | db.pos.Lock() |
| 597 | db.pos.value = nil |
| 598 | db.pos.Unlock() |
| 599 | } |
| 600 | |
| 601 | // Notify returns a channel that closes when the shadow WAL changes. |
| 602 | func (db *DB) Notify() <-chan struct{} { |