@ThreadSafe public class MigrationClientVersionStateInitializer extends Object
CoordinatorConfig.ClientVersionConfig and the current MigrationState in DDB,
as follows:
ClientVersionConfig | MigrationState (DDB) | initial client version
-------------------------+---------------------------------+----------------------------------------------
COMPATIBLE_WITH_2X_PHASE1| Does not exist | CLIENT_VERSION_INIT (local only, not written to DDB)
COMPATIBLE_WITH_2X | Does not exist | CLIENT_VERSION_UPGRADE_FROM_2X
3X | Does not exist | CLIENT_VERSION_3X
COMPATIBLE_WITH_2X_PHASE1| CLIENT_VERSION_3X_WITH_ROLLBACK | CLIENT_VERSION_3X_WITH_ROLLBACK
COMPATIBLE_WITH_2X | CLIENT_VERSION_3X_WITH_ROLLBACK | CLIENT_VERSION_3X_WITH_ROLLBACK
3X | CLIENT_VERSION_3X_WITH_ROLLBACK | CLIENT_VERSION_3X
any | CLIENT_VERSION_2X | CLIENT_VERSION_2X
any | CLIENT_VERSION_UPGRADE_FROM_2X | CLIENT_VERSION_UPGRADE_FROM_2X
any | CLIENT_VERSION_3X | CLIENT_VERSION_3X
Phase 1 COMPATIBLE_WITH_2X_PHASE1 does not write any state to DDB.
When CLIENT_VERSION_INIT is returned, the migration state machine remains inactive and
KCL operates in pure 2.x| Constructor and Description |
|---|
MigrationClientVersionStateInitializer() |
| Modifier and Type | Method and Description |
|---|---|
ClientVersion |
getClientVersionForInitialization(MigrationState migrationState) |
AbstractMap.SimpleEntry<ClientVersion,MigrationState> |
getInitialState()
Determine the initial client version by reading the current state from DDB and
applying the configured client version policy.
|
public MigrationClientVersionStateInitializer()
public AbstractMap.SimpleEntry<ClientVersion,MigrationState> getInitialState() throws DependencyException
enter() method.
If the read fails, Scheduler's retry loop will re-invoke the entire initialization.
DependencyException - if reading from DDB failspublic ClientVersion getClientVersionForInitialization(MigrationState migrationState)
Copyright © 2026. All rights reserved.