Browse Source

fix compilation

avoid_releasing_temp_file_on_write
chrislu 3 years ago
parent
commit
4d06e18554
  1. 2
      weed/filesys/page_writer.go
  2. 2
      weed/filesys/page_writer/chunked_file_writer.go
  3. 2
      weed/filesys/page_writer/chunked_stream_writer.go
  4. 2
      weed/filesys/page_writer/debug_content.go

2
weed/filesys/page_writer.go

@ -84,7 +84,7 @@ func (pw *PageWriter) ReadDirtyDataAt(data []byte, offset int64) (maxStop int64)
data = data[readSize:]
}
checkByteZero("page writer read", p, 0, maxStop-offset)
page_writer.CheckByteZero("page writer read", data, 0, maxStop-offset)
return
}

2
weed/filesys/page_writer/chunked_file_writer.go

@ -73,7 +73,7 @@ func (cw *ChunkedFileWriter) ReadDataAt(p []byte, off int64) (maxStop int64) {
glog.Errorf("reading temp file: %v", err)
break
}
checkByteZero("temp file writer read", p, logicStart-off, logicStop-off)
CheckByteZero("temp file writer read", p, logicStart-off, logicStop-off)
maxStop = max(maxStop, logicStop)
}
}

2
weed/filesys/page_writer/chunked_stream_writer.go

@ -81,7 +81,7 @@ func (cw *ChunkedStreamWriter) ReadDataAt(p []byte, off int64) (maxStop int64) {
copy(p[logicStart-off:logicStop-off], memChunk.buf[logicStart-memChunkBaseOffset:logicStop-memChunkBaseOffset])
maxStop = max(maxStop, logicStop)
checkByteZero("stream writer read", p, logicStart-off, logicStop-off)
CheckByteZero("stream writer read", p, logicStart-off, logicStop-off)
}
}

2
weed/filesys/page_writer/debug_content.go

@ -2,7 +2,7 @@ package page_writer
import "github.com/chrislusf/seaweedfs/weed/glog"
func checkByteZero(message string, p []byte, start, stop int64) {
func CheckByteZero(message string, p []byte, start, stop int64) {
isAllZero := true
for i := start; i < stop; i++ {
if p[i] != 0 {

Loading…
Cancel
Save