mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-08 04:14:29 +08:00
subscriber receives partitions and dispatch to processors
This commit is contained in:
@@ -71,3 +71,13 @@ func (partition Partition) ToPbPartition() *mq_pb.Partition {
|
||||
UnixTimeNs: partition.UnixTimeNs,
|
||||
}
|
||||
}
|
||||
|
||||
func (partition Partition) Overlaps(partition2 Partition) bool {
|
||||
if partition.RangeStart >= partition2.RangeStop {
|
||||
return false
|
||||
}
|
||||
if partition.RangeStop <= partition2.RangeStart {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user