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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
package filer
import (
"github.com/seaweedfs/seaweedfs/weed/pb"
)
// TrackPeerForTesting registers a peer as if the master had announced it, but
// without starting its subscription goroutine, so loop tests can drive the
// low-watermarks by hand. Test support only.
func (ma *MetaAggregator) TrackPeerForTesting(peer pb.ServerAddress) {
ma.peerChansLock.Lock()
ma.peerChans[peer] = make(chan struct{})
if peer != ma.self {
ma.noteRemotePeerArrivalLocked()
}
ma.peerChansLock.Unlock()
ma.initPeerWatermark(peer)
}
// ReportPeerWatermarksForTesting stands in for what a peer's stream reports:
// its delivery watermark (events and idle heartbeats) and its flush
// watermark. Test support only.
func (ma *MetaAggregator) ReportPeerWatermarksForTesting(peer pb.ServerAddress, deliveredTsNs, flushedTsNs int64) {
ma.advancePeerWatermark(peer, deliveredTsNs)
ma.advancePeerFlushWatermark(peer, flushedTsNs)
}