MCPcopy
hub / github.com/benbjohnson/litestream / initWriteBuffer

Method initWriteBuffer

vfs.go:2088–2092  ·  view source on GitHub ↗

initWriteBuffer initializes the write buffer file for durability. Any existing buffer content is discarded since unsync'd changes are lost on restart. This function acquires f.mu internally.

()

Source from the content-addressed store, hash-verified

2086// Any existing buffer content is discarded since unsync'd changes are lost on restart.
2087// This function acquires f.mu internally.
2088func (f *VFSFile) initWriteBuffer() error {
2089 f.mu.Lock()
2090 defer f.mu.Unlock()
2091 return f.initWriteBufferWithLock()
2092}
2093
2094// initWriteBufferWithLock initializes the write buffer file for durability.
2095// Any existing buffer content is discarded since unsync'd changes are lost on restart.

Callers 2

OpenMethod · 0.95
openNewDatabaseMethod · 0.95

Calls 3

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected