pbacsko commented on code in PR #579:
URL: https://github.com/apache/yunikorn-core/pull/579#discussion_r1281629081
##########
pkg/events/event_system.go:
##########
@@ -69,13 +95,29 @@ func CreateAndSetEventSystem() {
publisher: CreateShimPublisher(store),
eventBuffer: newEventRingBuffer(defaultRingBufferSize),
}
+
+ if eventSystemImpl, ok := ev.(*EventSystemImpl); ok {
+ eventSystemImpl.eventSystemId = fmt.Sprintf("event-system-%p",
eventSystemImpl)
+ ev = eventSystemImpl
+ }
Review Comment:
Do we need a different id each time? As far as I can see, we keep the
eventSystem instance... and even if we do, this can be something more trivial,
like a counter or something else, not a pointer address. Also, avoid the
validated type conversion, you can store the `EventSystemImpl` instance in a
different variable then assign it to `ev`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]