Browse Source

Producer: back off after failing to find a leader

Not just on flusher-triggered retries.
Evan Huus 11 years ago
parent
commit
fc260bd0a4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      producer.go

+ 1 - 0
producer.go

@@ -438,6 +438,7 @@ func (p *Producer) leaderDispatcher(topic string, partition int32, input chan *M
 		if output == nil {
 			if err := breaker.Run(doUpdate); err != nil {
 				p.returnError(msg, err)
+				time.Sleep(p.config.RetryBackoff)
 				continue
 			}
 			Logger.Printf("producer/leader selected broker %d on %s/%d\n", leader.ID(), topic, partition)