Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4da6e93

Browse files
authored
Merge pull request #8103 from boyuanzz/go_sdk
Reset Datasource counter to 0 in FinishBundle
2 parents 32bc6da + 5ff42a2 commit 4da6e93

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sdks/go/pkg/beam/core/runtime/exec/datasource.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ func (n *DataSource) Process(ctx context.Context) error {
174174
func (n *DataSource) FinishBundle(ctx context.Context) error {
175175
log.Infof(ctx, "DataSource: %d elements in %d ns", atomic.LoadInt64(&n.count), time.Now().Sub(n.start))
176176
n.source = nil
177-
return n.Out.FinishBundle(ctx)
177+
err := n.Out.FinishBundle(ctx)
178+
atomic.StoreInt64(&n.count, 0)
179+
return err
178180
}
179181

180182
func (n *DataSource) Down(ctx context.Context) error {

0 commit comments

Comments
 (0)