mlevkov opened a new pull request, #4302:
URL: https://github.com/apache/iggy/pull/4302

   Closes #4301.
   
   http_source answered 200 to two kinds of body that Iggy cannot store. One is 
an empty body. The other is a body over `MAX_PAYLOAD_SIZE` (64,000,000 bytes), 
which got through whenever `max_body_size_bytes` was set above that, since the 
option allowed up to 64 MiB. The runtime could not build the message, so it 
NACKed the whole batch without sending any of it. The source replays a NACKed 
batch before anything newer, so every webhook queued behind it was stuck. On 
master the SDK then stops the poll task after five NACKs, and the restart that 
recovers it drops the bridge. With the NACK limit off, as #4269 proposes for 
this source, the batch would replay forever instead.
   
   Two changes. `enqueue` now answers 400 `{"error":"empty body"}` before 
anything is queued, and both POST handlers go through it. The ceiling on 
`max_body_size_bytes` is now `MAX_PAYLOAD_SIZE`, so any body the handlers 
accept can be stored, and a larger one gets the existing 413. The README 
tables, the `on_nack` doc and an `auth.rs` comment are updated to match.
   
   One behaviour change: a `max_body_size_bytes` between 64,000,001 and 
67,108,864 now fails `open()`. A config like that could already stall the 
source with a single large request, so failing at start is the safer place to 
find out.
   
   The new integration test sends an empty body and then a real webhook, and 
checks that the webhook reaches Iggy. Without the fix it fails with "Expected 1 
messages on test_topic, got 0", which is the stall itself. Two unit tests cover 
the 400 on each path, and the existing ceiling test now checks that 64,000,001 
is refused. Locally, `prek run`, workspace clippy with all features, 214 unit 
tests and all 7 http_source integration tests pass.
   


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

Reply via email to