You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2019/09/09 22:59:51 UTC
[beam] 01/01: [Go SDK] Off By One error on splitting
This is an automated email from the ASF dual-hosted git repository.
lostluck pushed a commit to branch lostluck-patch-2
in repository https://gitbox.apache.org/repos/asf/beam.git
commit 8c1ce7d7443b7a4f301d92c3d601a57e4fae251f
Author: Robert Burke <lo...@users.noreply.github.com>
AuthorDate: Mon Sep 9 15:59:34 2019 -0700
[Go SDK] Off By One error on splitting
Split values are the last to be processed, not the first to be unprocessed.
---
sdks/go/pkg/beam/core/runtime/harness/harness.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sdks/go/pkg/beam/core/runtime/harness/harness.go b/sdks/go/pkg/beam/core/runtime/harness/harness.go
index 642583d..b5fffa5 100644
--- a/sdks/go/pkg/beam/core/runtime/harness/harness.go
+++ b/sdks/go/pkg/beam/core/runtime/harness/harness.go
@@ -272,8 +272,8 @@ func (c *control) handleInstruction(ctx context.Context, req *fnpb.InstructionRe
ProcessBundleSplit: &fnpb.ProcessBundleSplitResponse{
ChannelSplits: []*fnpb.ProcessBundleSplitResponse_ChannelSplit{
&fnpb.ProcessBundleSplitResponse_ChannelSplit{
- LastPrimaryElement: int32(split - 1),
- FirstResidualElement: int32(split),
+ LastPrimaryElement: int32(split),
+ FirstResidualElement: int32(split + 1),
},
},
},