AynSiddiqui opened a new issue, #2772:
URL: https://github.com/apache/iceberg-go/issues/2772

   From @laskoviymishka's review of #2679. Line numbers are on main at a3f138a6.
   
   net/http can replay a POST that has `GetBody` set when a reused connection 
fails (`CommitTable` builds a `bytes.Reader` body, `catalog/rest/rest.go:615`, 
sent at `:623`). Main sends `Idempotency-Key` when the server advertises a 
lifetime (`rest.go:416-418`, `681-690`), but it maps the final response without 
seeing the replay: a 409 becomes `ErrCommitFailed` (`rest.go:1898`) although 
the first send may have landed.
   - The higher-level commit loop (`Transaction.Commit` -> `doCommit`, 
`table/table.go:977-998`) may then refresh and retry it as a conflict.
   - Needs a reused connection and a replayable POST; in the HTTP/1 case the 
first request may already have been written when the connection failed. 
`GotConn`'s `Reused` also fires on ordinary pool reuse, so it can't detect a 
replay alone.
   - Not reproduced at runtime; found by reading the source.
   
   I can take this after #2679 lands.
   


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