fix function name in comment (#24879)

Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
cui fliter 2023-06-14 16:20:38 +08:00 committed by GitHub
parent 51404abe93
commit 35cb0b5ba6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,7 +117,7 @@ func getSegmentCapacityPolicy(sizeFactor float64) segmentSealPolicy {
}
}
// sealByMaxBinlogSizePolicy get segmentSealPolicy with lifetime limit compares ts - segment.lastExpireTime
// sealByLifetimePolicy get segmentSealPolicy with lifetime limit compares ts - segment.lastExpireTime
func sealByLifetimePolicy(lifetime time.Duration) segmentSealPolicy {
return func(segment *SegmentInfo, ts Timestamp) bool {
pts, _ := tsoutil.ParseTS(ts)
@ -127,7 +127,7 @@ func sealByLifetimePolicy(lifetime time.Duration) segmentSealPolicy {
}
}
// sealByMaxBinlogSizePolicy seal segment if binlog file number of segment exceed configured max number
// sealByMaxBinlogFileNumberPolicy seal segment if binlog file number of segment exceed configured max number
func sealByMaxBinlogFileNumberPolicy(maxBinlogFileNumber int) segmentSealPolicy {
return func(segment *SegmentInfo, ts Timestamp) bool {
logFileCounter := 0
@ -158,7 +158,7 @@ func sealLongTimeIdlePolicy(idleTimeTolerance time.Duration, minSizeToSealIdleSe
// channelSealPolicy seal policy applies to channel
type channelSealPolicy func(string, []*SegmentInfo, Timestamp) []*SegmentInfo
// getChannelCapacityPolicy get channelSealPolicy with channel segment capacity policy
// getChannelOpenSegCapacityPolicy get channelSealPolicy with channel segment capacity policy
func getChannelOpenSegCapacityPolicy(limit int) channelSealPolicy {
return func(channel string, segs []*SegmentInfo, ts Timestamp) []*SegmentInfo {
if len(segs) <= limit {
@ -173,7 +173,7 @@ func getChannelOpenSegCapacityPolicy(limit int) channelSealPolicy {
}
}
// sortSegStatusByLastExpires sort segmentStatus with lastExpireTime ascending order
// sortSegmentsByLastExpires sort segmentStatus with lastExpireTime ascending order
func sortSegmentsByLastExpires(segs []*SegmentInfo) {
sort.Slice(segs, func(i, j int) bool {
return segs[i].LastExpireTime < segs[j].LastExpireTime