[
https://issues.apache.org/jira/browse/BEAM-11106?focusedWorklogId=774849&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-774849
]
ASF GitHub Bot logged work on BEAM-11106:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 25/May/22 23:48
Start Date: 25/May/22 23:48
Worklog Time Spent: 10m
Work Description: lostluck commented on code in PR #17755:
URL: https://github.com/apache/beam/pull/17755#discussion_r882204700
##########
sdks/go/pkg/beam/core/runtime/exec/sdf.go:
##########
@@ -308,7 +308,12 @@ func (n *TruncateSizedRestriction) StartBundle(ctx
context.Context, id string, d
// Timestamps
// }
func (n *TruncateSizedRestriction) ProcessElement(ctx context.Context, elm
*FullValue, values ...ReStream) error {
- mainElm := elm.Elm.(*FullValue).Elm.(*FullValue)
+ mainElm := elm.Elm.(*FullValue)
+ inp := mainElm.Elm
+ if e, ok := mainElm.Elm.(*FullValue); ok {
Review Comment:
Did this happen in production or in a unit test? It's possible that the unit
test is wrong by itself, as the input diagram should be correct. The Element
will always be wrapped in a FullValue because it could be a KV. A single
element would also be in the Elm field with a nil Elm2 field.
In prod, you should be able to at log the received coder when the bundle is
being expanded in exec/translate.go (since the coder is accessible there), and
that should tell us what we're expecting here all the time.
Issue Time Tracking
-------------------
Worklog Id: (was: 774849)
Time Spent: 7h 50m (was: 7h 40m)
> [Go SDK] Truncating SDFs during drain
> -------------------------------------
>
> Key: BEAM-11106
> URL: https://issues.apache.org/jira/browse/BEAM-11106
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-go
> Reporter: Robert Burke
> Assignee: Ritesh Ghorse
> Priority: P3
> Fix For: 2.39.0
>
> Time Spent: 7h 50m
> Remaining Estimate: 0h
>
> Allow SDFs to specify a restriction truncation method to permit faster drains.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)