Browse Source

delete actual reference first

pull/2596/head
chrislu 3 years ago
parent
commit
381f4e73a0
  1. 2
      weed/filesys/page_writer/upload_pipeline.go

2
weed/filesys/page_writer/upload_pipeline.go

@ -146,10 +146,10 @@ func (cw *UploadPipeline) moveToSealed(memChunk *MemChunk, logicChunkIndex Logic
cw.saveOneChunk(sealedChunk.chunk, logicChunkIndex)
// then remove from sealed chunks
sealedChunk.FreeReference()
cw.sealedChunksLock.Lock()
defer cw.sealedChunksLock.Unlock()
delete(cw.sealedChunks, logicChunkIndex)
sealedChunk.FreeReference()
atomic.AddInt32(&cw.activeWriterCount, -1)
glog.V(4).Infof("activeWriterCount %d --> %d", cw.activeWriterCount+1, cw.activeWriterCount)

Loading…
Cancel
Save