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

   ## Summary
   
   - use one pagination loop for namespace, table, view, and function listings
   - track nonempty page tokens and stop when a server repeats one
   - preserve already yielded results and early iterator termination
   
   ## Problem
   
   REST listing loops stopped only when `next-page-token` was empty. A server 
returning `A → A` or `A → B → A` caused the client to request pages 
indefinitely and repeatedly yield duplicate objects.
   
   ## Fix
   
   The shared pagination loop records every next-page token before requesting 
it. If a later response repeats a token, pagination stops before another 
request and returns an error wrapping `ErrRESTError`. The opaque token is not 
included in the error.
   
   The regression covers an `A → B → A` cycle, verifies all three received 
pages are yielded, and proves no fourth request is made. It also verifies that 
callers breaking iteration still stop paging immediately.
   
   ## Testing
   
   - `go test ./catalog/rest`
   - `go test -race ./catalog/rest`
   - `go vet ./catalog/rest`
   - repository package tests excluding `io/gocloud`


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