mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
prevent concurrent access during shutdown
This commit is contained in:
parent
bb4beebce3
commit
8b3d76b24d
|
@ -187,6 +187,9 @@ func (up *UploadPipeline) moveToSealed(memChunk PageChunk, logicChunkIndex Logic
|
||||||
|
|
||||||
func (up *UploadPipeline) Shutdown() {
|
func (up *UploadPipeline) Shutdown() {
|
||||||
up.swapFile.FreeResource()
|
up.swapFile.FreeResource()
|
||||||
|
|
||||||
|
up.sealedChunksLock.Lock()
|
||||||
|
defer up.sealedChunksLock.Unlock()
|
||||||
for logicChunkIndex, sealedChunk := range up.sealedChunks {
|
for logicChunkIndex, sealedChunk := range up.sealedChunks {
|
||||||
sealedChunk.FreeReference(fmt.Sprintf("%s uploadpipeline shutdown chunk %d", up.filepath, logicChunkIndex))
|
sealedChunk.FreeReference(fmt.Sprintf("%s uploadpipeline shutdown chunk %d", up.filepath, logicChunkIndex))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue