This commit is contained in:
chrislu 2021-12-23 17:48:34 -08:00
parent 1d36884845
commit f77ca41769
2 changed files with 13 additions and 13 deletions

View file

@ -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) { func (pages *ContinuousDirtyPages) ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64) {
return pages.intervals.ReadDataAt(data, startOffset) return pages.intervals.ReadDataAt(data, startOffset)
} }

View file

@ -92,3 +92,16 @@ func (pw *PageWriter) GetStorageOptions() (collection, replication string) {
func (pw *PageWriter) Destroy() { func (pw *PageWriter) Destroy() {
pw.randomWriter.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
}