diff options
| author | chrislu <chris.lu@gmail.com> | 2022-01-17 20:41:00 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-01-17 20:41:00 -0800 |
| commit | 0a3f95ca01a3667116b0a7420325bb523886ff75 (patch) | |
| tree | 9df21312db9e98e80780981e3a45297fa493b6c8 | |
| parent | b068bc291dcf30ad73682eaf1884a7c4d9c7f560 (diff) | |
| download | seaweedfs-0a3f95ca01a3667116b0a7420325bb523886ff75.tar.xz seaweedfs-0a3f95ca01a3667116b0a7420325bb523886ff75.zip | |
more logs
| -rw-r--r-- | weed/filesys/filehandle.go | 2 | ||||
| -rw-r--r-- | weed/filesys/page_writer/upload_pipeline.go | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index 619d9a226..8606ac0d2 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -163,7 +163,7 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, error) { glog.Errorf("file handle read %s: %v", fileFullPath, err) } - // glog.V(4).Infof("file handle read %s [%d,%d] %d : %v", fileFullPath, offset, offset+int64(totalRead), totalRead, err) + glog.V(4).Infof("file handle read %s [%d,%d] %d : %v", fileFullPath, offset, offset+int64(totalRead), totalRead, err) return int64(totalRead), err } diff --git a/weed/filesys/page_writer/upload_pipeline.go b/weed/filesys/page_writer/upload_pipeline.go index 83e5c8b60..9f459c11e 100644 --- a/weed/filesys/page_writer/upload_pipeline.go +++ b/weed/filesys/page_writer/upload_pipeline.go @@ -81,6 +81,7 @@ func (cw *UploadPipeline) MaybeReadDataAt(p []byte, off int64) (maxStop int64) { cw.sealedChunksLock.Unlock() if found { maxStop = readMemChunk(sealedChunk.chunk, p, off, logicChunkIndex, cw.ChunkSize) + glog.V(4).Infof("%s read sealed memchunk [%d,%d)", cw.filepath, off, maxStop) sealedChunk.FreeReference(fmt.Sprintf("%s finish reading chunk %d", cw.filepath, logicChunkIndex)) } @@ -91,7 +92,9 @@ func (cw *UploadPipeline) MaybeReadDataAt(p []byte, off int64) (maxStop int64) { if !found { return } - maxStop = max(maxStop, readMemChunk(writableChunk, p, off, logicChunkIndex, cw.ChunkSize)) + writableMaxStop := readMemChunk(writableChunk, p, off, logicChunkIndex, cw.ChunkSize) + glog.V(4).Infof("%s read writable memchunk [%d,%d)", cw.filepath, off, writableMaxStop) + maxStop = max(maxStop, writableMaxStop) return } |
