Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
fix a bug in updatedestinaiton
Browse files Browse the repository at this point in the history
  • Loading branch information
datoug committed Jun 14, 2017
1 parent 8a6e001 commit 5cf67d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/common/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func UpdateDestination(c *cli.Context, cClient ccli.Client, mClient mcli.Client,
// issue with cross zone replication(for example, network down between zones)
existingDesc, err := readDestinationFromMetadata(mClient, path)
ExitIfError(err)
if existingDesc.GetIsMultiZone() || len(request.GetZoneConfigs().GetConfigs()) > 0 {
if existingDesc.GetIsMultiZone() || (request.IsSetZoneConfigs() && len(request.GetZoneConfigs().GetConfigs()) > 0) {
if c.IsSet(`unconsumed_messages_retention`) && int32(c.Int(`unconsumed_messages_retention`)) < MinUnconsumedMessagesRetentionForMultiZoneDest {
ExitIfError(errors.New(strUnconsumedRetentionTooSmall))
}
Expand Down

0 comments on commit 5cf67d9

Please sign in to comment.