mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
@@ -875,7 +875,11 @@ func (fs *fileStore) newMsgBlockForWrite() (*msgBlock, error) {
|
||||
}
|
||||
|
||||
mb := &msgBlock{fs: fs, index: index, cexp: fs.fcfg.CacheExpire}
|
||||
|
||||
// Lock should be held to quiet race detector.
|
||||
mb.mu.Lock()
|
||||
mb.setupWriteCache(mbuf)
|
||||
mb.mu.Unlock()
|
||||
|
||||
// Now do local hash.
|
||||
key := sha256.Sum256(fs.hashKeyForBlock(index))
|
||||
|
||||
Reference in New Issue
Block a user