mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
delete actual reference first
This commit is contained in:
parent
0ba88596e8
commit
381f4e73a0
|
@ -146,10 +146,10 @@ func (cw *UploadPipeline) moveToSealed(memChunk *MemChunk, logicChunkIndex Logic
|
||||||
cw.saveOneChunk(sealedChunk.chunk, logicChunkIndex)
|
cw.saveOneChunk(sealedChunk.chunk, logicChunkIndex)
|
||||||
|
|
||||||
// then remove from sealed chunks
|
// then remove from sealed chunks
|
||||||
sealedChunk.FreeReference()
|
|
||||||
cw.sealedChunksLock.Lock()
|
cw.sealedChunksLock.Lock()
|
||||||
defer cw.sealedChunksLock.Unlock()
|
defer cw.sealedChunksLock.Unlock()
|
||||||
delete(cw.sealedChunks, logicChunkIndex)
|
delete(cw.sealedChunks, logicChunkIndex)
|
||||||
|
sealedChunk.FreeReference()
|
||||||
|
|
||||||
atomic.AddInt32(&cw.activeWriterCount, -1)
|
atomic.AddInt32(&cw.activeWriterCount, -1)
|
||||||
glog.V(4).Infof("activeWriterCount %d --> %d", cw.activeWriterCount+1, cw.activeWriterCount)
|
glog.V(4).Infof("activeWriterCount %d --> %d", cw.activeWriterCount+1, cw.activeWriterCount)
|
||||||
|
|
Loading…
Reference in a new issue