diff --git a/app/update-index-mutation.js b/app/update-index-mutation.js index d163a62..4d04045 100644 --- a/app/update-index-mutation.js +++ b/app/update-index-mutation.js @@ -62,8 +62,9 @@ export class UpdateIndexMutation extends IndexMutation { ` -> ${this.definition.condition || 'none'}`)); } - if (!this.definition.manual_replica && - this.definition.num_replica > 0) { + let hasReplica = Math.max(this.definition.num_replica, + this.existingIndex.num_replica) > 0; + if (!this.definition.manual_replica && hasReplica) { logger.info( chalk.cyanBright( ` Repl: ${this.definition.num_replica}`)); diff --git a/example/beer-sample/default.yaml b/example/beer-sample/default.yaml index 882272d..2bd913f 100644 --- a/example/beer-sample/default.yaml +++ b/example/beer-sample/default.yaml @@ -16,9 +16,6 @@ num_replica: 0 name: DocsByType index_key: - type -partition: - exprs: - - type --- name: BreweriesByAddress index_key: