zeroshade opened a new pull request, #2289:
URL: https://github.com/apache/iceberg-go/pull/2289

   ### Problem
   
   `TestPositionDeletePartitionedNoGoroutineLeak` compares 
`runtime.NumGoroutine()` before and after 50 partitioned position-delete 
writes, allowing a margin of 5. The count covers the whole test binary, and the 
test calls `t.Parallel()`, so goroutines from other `table` tests running at 
the same time count as leaks. It failed with deltas around 6 in 4 of the last 
40 failed `go-ci` runs: twice on `main` 
([39276480459](https://github.com/apache/iceberg-go/actions/runs/39276480459), 
[39674109108](https://github.com/apache/iceberg-go/actions/runs/39674109108)) 
and on #2266 and another unrelated branch.
   
   ### Fix
   
   - Drop `t.Parallel()`, so the test only runs while no parallel tests are 
active.
   - Fail only when growth reaches half the iteration count. The leak it guards 
against (`stopCount` never called in the partitioned path) adds one goroutine 
per iteration, so the margin no longer depends on stray goroutines from earlier 
tests.
   
   ### Testing
   
   - `go test -count=3 ./table/` passes.
   - With `defer w.stopCount()` removed from `writerFactory.closeAll`, the test 
still fails: `got 2 -> 52 (delta: 50)`.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to