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


##########
sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go:
##########
@@ -23,26 +23,46 @@ import (
        "context"
        "fmt"
        "io"
+       "sort"
        "strings"
        "sync"
        "sync/atomic"
 
+       "github.com/apache/beam/sdks/v2/go/pkg/beam/core/graph/coder"
        "github.com/apache/beam/sdks/v2/go/pkg/beam/core/graph/mtime"
        "github.com/apache/beam/sdks/v2/go/pkg/beam/core/graph/window"
        "github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec"
        "github.com/apache/beam/sdks/v2/go/pkg/beam/core/typex"
+       "golang.org/x/exp/maps"
        "golang.org/x/exp/slog"
 )
 
 type element struct {
-       window    typex.Window
-       timestamp mtime.Time
-       pane      typex.PaneInfo
+       window                 typex.Window
+       timestamp              mtime.Time
+       holdTimestamp          mtime.Time // only used for Timers
+       pane                   typex.PaneInfo
+       transform, family, tag string // only used for Timers.
 
-       elmBytes []byte
+       elmBytes []byte // When nil, indicates this is a timer.

Review Comment:
   Yes, as elementHeap is defined on the elementType.
   
   We could make element an interface type, and then have separate versions for 
elements and timers, but this would add additional garbage collect and similar. 
However, that then makes this change *much* bigger as everything currently 
using the elements must change.
   
   If possible, I'd prefer to do that as a separate subsequent change, if at 
all.



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