Giter Club home page Giter Club logo

Comments (8)

eapache avatar eapache commented on August 20, 2024

I believe the correct fix for this is:

  • have reenqueue return non-nil when msg.retried so we know it hasn't been delivered
  • have flushRequest call errorCb(nil) when overlimit == 0

On inspection there are two other issues:

  • duplicate of this code around line 378 of producer.go, as above
  • if the response is well formed but empty (no blocks, or blocks but no partitions) then we return without ever calling errorCb - to fix this we should probably set a flag when we see a block-partition, and call errorCb if the flag is unset after the main loop

from sarama.

eapache avatar eapache commented on August 20, 2024

@burke @fw42 @wvanbergen does this make sense to you?

from sarama.

wvanbergen avatar wvanbergen commented on August 20, 2024

I am not quite sure what the initial problem was here? :/

from sarama.

fw42 avatar fw42 commented on August 20, 2024

Yeah ditto, no clue what this is about :-) Can you elaborate?

from sarama.

eapache avatar eapache commented on August 20, 2024

It's a deadlock, read the inserted comments in the code block in order (1, 2, 3). #90 also includes a stack trace which I believe is the same issue.

from sarama.

eapache avatar eapache commented on August 20, 2024

Basically: enqueue expects that flushRequest calls errorCb exactly once, so that there is something on the errs channel for it to return. There are some cases where we never call errorCb (or call errorCb multiple times) which both cause a deadlock reading or writing to the errs channel.

from sarama.

wvanbergen avatar wvanbergen commented on August 20, 2024

OK, now it makes sense to me. Your solutions makes sense to me. I wonder whether we can build tests around this.

from sarama.

eapache avatar eapache commented on August 20, 2024

https://groups.google.com/forum/#!topic/sarama-users/8smSO57Ubzg found a way to consistently reproduce the hang, but it requires some dns hackery - I will use that to at least test a local copy of the fix

from sarama.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.