未验证 提交 35cb0b5b 编写于 作者: C cui fliter 提交者: GitHub

fix function name in comment (#24879)

Signed-off-by: Ncui fliter <imcusg@gmail.com>
上级 51404abe
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册