Browse Source

refactor

pull/2534/head
chrislu 3 years ago
parent
commit
f77ca41769
  1. 13
      weed/filesys/dirty_pages_continuous.go
  2. 13
      weed/filesys/page_writer.go

13
weed/filesys/dirty_pages_continuous.go

@ -127,19 +127,6 @@ func (pages *ContinuousDirtyPages) saveToStorage(reader io.Reader, offset int64,
}
}
func max(x, y int64) int64 {
if x > y {
return x
}
return y
}
func min(x, y int64) int64 {
if x < y {
return x
}
return y
}
func (pages *ContinuousDirtyPages) ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64) {
return pages.intervals.ReadDataAt(data, startOffset)
}

13
weed/filesys/page_writer.go

@ -92,3 +92,16 @@ func (pw *PageWriter) GetStorageOptions() (collection, replication string) {
func (pw *PageWriter) Destroy() {
pw.randomWriter.Destroy()
}
func max(x, y int64) int64 {
if x > y {
return x
}
return y
}
func min(x, y int64) int64 {
if x < y {
return x
}
return y
}
Loading…
Cancel
Save