Skip to content

Commit 887d9ef

Browse files
mknyszekgopherbot
authored andcommitted
internal/trace: increment sync counter before final Sync on error
CL 648195 was supposed to have fixed #71615, but it didn't include an update to r.syncs. I can confirm this CL fixes the issue even when running the test many times in a row. Fixes #71615. Change-Id: I97db3d639dc5bc8648a191696f90b0e5087307c8 Reviewed-on: https://go-review.googlesource.com/c/go/+/648315 Auto-Submit: Michael Knyszek <[email protected]> Reviewed-by: Cherry Mui <[email protected]> TryBot-Bypass: Michael Knyszek <[email protected]>
1 parent 7c1a413 commit 887d9ef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/internal/trace/reader.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ func (r *Reader) ReadEvent() (e Event, err error) {
154154
// Read the next generation.
155155
r.gen, r.spill, r.spillErr = readGeneration(r.r, r.spill)
156156
if r.gen == nil {
157+
r.syncs++
157158
return syncEvent(nil, r.lastTs, r.syncs), nil
158159
}
159160

0 commit comments

Comments
 (0)