Skip to content

Commit

Permalink
Log RTracker error on TryClaim in test
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmccluskey committed May 19, 2022
1 parent 52b9f54 commit 9ecb375
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sdks/go/test/integration/primitives/checkpointing.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
package primitives

import (
"context"
"reflect"
"time"

"github.com/apache/beam/sdks/v2/go/pkg/beam"
"github.com/apache/beam/sdks/v2/go/pkg/beam/core/sdf"
"github.com/apache/beam/sdks/v2/go/pkg/beam/io/rtrackers/offsetrange"
"github.com/apache/beam/sdks/v2/go/pkg/beam/log"
"github.com/apache/beam/sdks/v2/go/pkg/beam/testing/passert"
)

Expand Down Expand Up @@ -77,6 +79,9 @@ func (fn *selfCheckpointingDoFn) ProcessElement(rt *sdf.LockRTracker, _ []byte,
counter++
} else if rt.GetError() != nil || rt.IsDone() {
// Stop processing on error or completion
if err := rt.GetError(); err != nil {
log.Errorf(context.Background(), "error in restriction tracker, got %v", err)
}
return sdf.StopProcessing()
} else {
// Resume later.
Expand Down

0 comments on commit 9ecb375

Please sign in to comment.