zechenj18 commented on code in PR #29774:
URL: https://github.com/apache/beam/pull/29774#discussion_r1427370261
##########
sdks/go/pkg/beam/core/runtime/exec/pcollection.go:
##########
@@ -85,8 +86,8 @@ func (w *byteCounter) Write(p []byte) (n int, err error) {
// ProcessElement increments the element count and sometimes takes size
samples of the elements.
func (p *PCollection) ProcessElement(ctx context.Context, elm *FullValue,
values ...ReStream) error {
- cur := atomic.AddInt64(&p.elementCount, 1)
- if cur == p.nextSampleIdx {
+ cur := atomic.AddInt64(&p.bundleElementCount, 1)
+ if cur+p.pCollectionElementCount == p.nextSampleIdx {
Review Comment:
Done: )
Added in pCollection struct definition.
--
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]