Skip to content

Commit

Permalink
Merge pull request #975 from Shopify/return-partial-replicas
Browse files Browse the repository at this point in the history
client: return partial replicas
  • Loading branch information
eapache authored Nov 10, 2017
2 parents b305748 + 84d87a3 commit 3406836
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func (client *client) Replicas(topic string, partitionID int32) ([]int32, error)
}

if metadata.Err == ErrReplicaNotAvailable {
return nil, metadata.Err
return dupInt32Slice(metadata.Replicas), metadata.Err
}
return dupInt32Slice(metadata.Replicas), nil
}
Expand All @@ -322,7 +322,7 @@ func (client *client) InSyncReplicas(topic string, partitionID int32) ([]int32,
}

if metadata.Err == ErrReplicaNotAvailable {
return nil, metadata.Err
return dupInt32Slice(metadata.Isr), metadata.Err
}
return dupInt32Slice(metadata.Isr), nil
}
Expand Down

0 comments on commit 3406836

Please sign in to comment.