-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GO-4594: text gets deleted constantly when I'm typing #1929
GO-4594: text gets deleted constantly when I'm typing #1929
Conversation
AnastasiaShemyakinskaya
commented
Dec 10, 2024
- IsActive и IsFullDetailsSent returns slices now
- IsFullDetailSent is not overwrite if it's already set for subscription
- sFullDetailSent is set during subscriptions init (for sorted and simple sub)
Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
util/maputils/map.go
Outdated
@@ -0,0 +1,9 @@ | |||
package maputils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use https://pkg.go.dev/maps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
Coverage provided by https://github.com/seriousben/go-patch-cover-action |
core/subscription/cache.go
Outdated
} | ||
} else { | ||
return false | ||
// GetActive indicates that entry is inside the current pagination window for all of provided subscription IDs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment is outdated
core/subscription/cache.go
Outdated
} | ||
} else { | ||
return false | ||
// GetFullDetailsSent that in the context of ALL provided subscriptions we have previously sent the full ObjectSetDetails event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment is outdated
core/subscription/context.go
Outdated
|
||
notActive := slice.Difference(info.subIds, active) | ||
detailsNotSent := slice.Difference(info.subIds, detailsSent) | ||
sentSetDetails = lo.Union(notActive, detailsNotSent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming("sent") is confusing here, it is actually opposite. Maybe smth like "subIdsToSendFullDetails", "subIdsToSendDiffDetails"
core/subscription/context.go
Outdated
return msgs | ||
} | ||
|
||
func (ctx *opCtx) addDetailsSentEvent(msgs []*pb.EventMessage, curr *entry, subIds, keys []string) []*pb.EventMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrect method naming
e.subIsActive[pos] = isActive | ||
e.subFullDetailsSent[pos] = isFullDetailSent | ||
e.subIsActive[subId] = isActive | ||
if !e.subFullDetailsSent[subId] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add an explaining comment here, why don't we overwrite
Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>