|
@@ -599,7 +599,7 @@ func (client *client) updateMetadata(data *MetadataResponse) ([]string, error) {
|
|
|
client.registerBroker(broker)
|
|
client.registerBroker(broker)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- toRetry := make(map[string]bool)
|
|
|
|
|
|
|
+ toRetry := make(map[string]none)
|
|
|
|
|
|
|
|
var err error
|
|
var err error
|
|
|
for _, topic := range data.Topics {
|
|
for _, topic := range data.Topics {
|
|
@@ -615,10 +615,10 @@ func (client *client) updateMetadata(data *MetadataResponse) ([]string, error) {
|
|
|
continue
|
|
continue
|
|
|
case ErrUnknownTopicOrPartition: // retry, do not store partial partition results
|
|
case ErrUnknownTopicOrPartition: // retry, do not store partial partition results
|
|
|
err = topic.Err
|
|
err = topic.Err
|
|
|
- toRetry[topic.Name] = true
|
|
|
|
|
|
|
+ toRetry[topic.Name] = none{}
|
|
|
continue
|
|
continue
|
|
|
case ErrLeaderNotAvailable: // retry, but store partiial partition results
|
|
case ErrLeaderNotAvailable: // retry, but store partiial partition results
|
|
|
- toRetry[topic.Name] = true
|
|
|
|
|
|
|
+ toRetry[topic.Name] = none{}
|
|
|
break
|
|
break
|
|
|
default: // don't retry, don't store partial results
|
|
default: // don't retry, don't store partial results
|
|
|
Logger.Printf("Unexpected topic-level metadata error: %s", topic.Err)
|
|
Logger.Printf("Unexpected topic-level metadata error: %s", topic.Err)
|
|
@@ -630,7 +630,7 @@ func (client *client) updateMetadata(data *MetadataResponse) ([]string, error) {
|
|
|
for _, partition := range topic.Partitions {
|
|
for _, partition := range topic.Partitions {
|
|
|
client.metadata[topic.Name][partition.ID] = partition
|
|
client.metadata[topic.Name][partition.ID] = partition
|
|
|
if partition.Err == ErrLeaderNotAvailable {
|
|
if partition.Err == ErrLeaderNotAvailable {
|
|
|
- toRetry[topic.Name] = true
|
|
|
|
|
|
|
+ toRetry[topic.Name] = none{}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|