lostluck commented on code in PR #36069:
URL: https://github.com/apache/beam/pull/36069#discussion_r2342213066


##########
sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go:
##########
@@ -1084,6 +1084,14 @@ func (em *ElementManager) refreshWatermarks() 
set[string] {
        return refreshed
 }
 
+func (em *ElementManager) wakeUpAt(t mtime.Time) {
+       go func(fireAt time.Time) {
+               time.AfterFunc(time.Until(fireAt), func() {
+                       em.refreshCond.Broadcast()
+               })
+       }(t.ToTime())

Review Comment:
   We should also only be creating this Goroutine when the Real Time Clock is 
being used, and testStreamHandler is nil. Otherwise behavior will be 
additionally wonky.
   
   eg. 
https://github.com/apache/beam/blob/00c1f10fb51070cdcfc220c5f51eff58d5b48bd6/sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go#L2171
   
   I recommend moving this clock function down there too, as they are related.



-- 
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]

Reply via email to