Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

613 B
Raw Blame
package page_writer

type DirtyPages interface {
	AddPage(offset int64, data []byte, isSequential bool, tsNs int64) error
	FlushData() error
	HasWrites() bool
	ReadDirtyDataAt(data []byte, startOffset int64, tsNs int64) (maxStop int64)
	Destroy()
	LockForRead(startOffset, stopOffset int64)
	UnlockForRead(startOffset, stopOffset int64)
	EvictOneWritableChunk() bool
	ProactiveFlush(nowNs, idleThresholdNs, maxHoldNs, fillRatio int64, frontierLag int, isSequential bool) bool
}

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
}