redpanda icon indicating copy to clipboard operation
redpanda copied to clipboard

redpanda: false negative produce request on first stage failure

Open dotnwat opened this issue 4 years ago • 2 comments

@mmaslankaprv while working on a fix for #2013 I noticed that it looks like when an error occurs in the first stage of handling a produce request, then even if some other partition is handled successfully in the same produce request, the first stage failure masks that and an error is returned to the client. am I reading that behavior correctly?

dotnwat avatar Aug 09 '21 01:08 dotnwat

@BenPope had an example of a really clean rewrite of part of the produce handler that we should do when we need to restructure it to fix this ticket https://github.com/vectorizedio/redpanda/pull/2014#discussion_r685072124

dotnwat avatar Aug 09 '21 17:08 dotnwat

maybe we can use ss::when_all this way we can access individual results for each dispatch phase:

  return ss::when_all(dispatched.begin(), dispatched.end())
            .then([&octx,
                   dispatched_promise = std::move(dispatched_promise),
                   produced = std::move(produced)](
                    std::vector<ss::future<>> dispatched_resusts) mutable {

...

mmaslankaprv avatar Aug 13 '21 08:08 mmaslankaprv