Skip to content

Commit 2736845

Browse files
committed
Updated conditions
1 parent 2b389da commit 2736845

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

storage/inmemory/mutexmap/rulebasedsegment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (r *RuleBasedSegmentsStorageImpl) Segments() *set.ThreadUnsafeSet {
9696
for _, ruleBased := range r.data {
9797
for _, condition := range ruleBased.Conditions {
9898
for _, matcher := range condition.MatcherGroup.Matchers {
99-
if matcher.UserDefinedSegment != nil && matcher.MatcherType != constants.MatcherTypeInRuleBasedSegment {
99+
if matcher.UserDefinedSegment != nil && matcher.MatcherType == constants.MatcherTypeInSegment {
100100
segments.Add(matcher.UserDefinedSegment.SegmentName)
101101
}
102102
}
@@ -119,7 +119,7 @@ func (r *RuleBasedSegmentsStorageImpl) LargeSegments() *set.ThreadUnsafeSet {
119119
for _, condition := range ruleBased.Conditions {
120120
for _, matcher := range condition.MatcherGroup.Matchers {
121121
if matcher.UserDefinedLargeSegment != nil {
122-
largeSegments.Add(matcher.UserDefinedSegment.SegmentName)
122+
largeSegments.Add(matcher.UserDefinedLargeSegment.LargeSegmentName)
123123
}
124124
}
125125
}

storage/inmemory/mutexmap/splits.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func (m *MMSplitStorage) SegmentNames() *set.ThreadUnsafeSet {
198198
for _, split := range m.data {
199199
for _, condition := range split.Conditions {
200200
for _, matcher := range condition.MatcherGroup.Matchers {
201-
if matcher.UserDefinedSegment != nil && matcher.MatcherType != constants.MatcherTypeInRuleBasedSegment {
201+
if matcher.UserDefinedSegment != nil && matcher.MatcherType == constants.MatcherTypeInSegment {
202202
segments.Add(matcher.UserDefinedSegment.SegmentName)
203203
}
204204

0 commit comments

Comments
 (0)