wusong
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
7 deletions
-
weed/mount/page_writer/page_chunk_mem.go
|
|
@ -1,10 +1,11 @@ |
|
|
|
package page_writer |
|
|
|
|
|
|
|
import ( |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/util" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/util/mem" |
|
|
|
"sync" |
|
|
|
"sync/atomic" |
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/util" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/util/mem" |
|
|
|
) |
|
|
|
|
|
|
|
var ( |
|
|
@ -100,11 +101,6 @@ func (mc *MemChunk) SaveContent(saveFn SaveToStorageFunc) { |
|
|
|
if saveFn == nil { |
|
|
|
return |
|
|
|
} |
|
|
|
for t := mc.usage.head.next; t != mc.usage.tail; t = t.next { |
|
|
|
reader := util.NewBytesReader(mc.buf[t.StartOffset:t.stopOffset]) |
|
|
|
saveFn(reader, int64(mc.logicChunkIndex)*mc.chunkSize+t.StartOffset, t.Size(), t.TsNs, func() { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
for t := mc.usage.head.next; t != mc.usage.tail; t = t.next { |
|
|
|
startOffset := t.StartOffset |
|
|
|