Back to Cadence

What?

docs/migration/tasklist-partition-config.md

1.4.02.5 KB
Original Source

What?

This document writes the steps we need to execute to migrate the number of task list partitions configuration from dynamic configuration to the database. For background knowledge about task list partition, please read this doc.

Why?

We're doing this migration because we want to programmatically update the number of task list partitions. Not all implementations of dynamic configuration dependencies support update operation.

How?

  1. Check the existing number of partitions for the task list you want to migrate:

  2. Run the following ClI commands to update the number of partitions of the task list you want to migrate and make sure that task list type parameter is not missing in your commands:

cadence admin tasklist update-partition -h

To get the number of partitions from database, use the following CLI command:

cadence admin tasklist describe -h
  1. Set this dynamic configuration value to true for the task list you want to migrate:
  1. Repeat the steps for all task lists. However, you can skip the steps if the number of partitions of the task list is 1.

  2. You can enable adaptive task list scaler for the task list. Set matching.enableAdaptiveScaler to true for the task list.

Status

As of v1.2.17, the default value of matching.enableGetNumberOfPartitionsFromCache is still false.

Plan

We're planning to change the default value of matching.enableGetNumberOfPartitionsFromCache to true in v2. We're planning to deprecate matching.numTasklistReadPartitions and matching.numTasklistWritePartitions, but we haven't decided when to do it. Please be prepared for the migration.