IDIEP-101
Author
Sponsor


Created

28.11.2024

Status


Motivation

For now, Ignite cluster can be upgraded only by full cluster restart.

Procedure must be the following:

  1. Stop ALL cluster nodes.
  2. Update files on each node.
  3. Start nodes one by one.

Each version update means cluster unavailability for the end user.
This is extremely inconvenient, especially for the users who use Ignite as a primary data storage.
Other systems supports rolling upgrade feature when upgrade made node by node without unavailability period.
After implementing rolling upgrade, Ignite must support the following upgrade procedure:

  1. Stop one node.
  2. Upgrade files on the node.
  3. Start node.
  4. Repeat steps 1-3 for each node in cluster.

Description

Rolling Upgrade assume that cluster can consist of Ignite nodes of different versions.
So Ignite must provide backward compatibility on network level and ability to work in mixed topology.
Development time checks, tests must be added to provide protection of incorrect patches.
Ignite codebase must be reorganized in a way to clearly distinguish those parts that require compatibility and those who don't.

Let's define clearly, what "backward compatibility" for the network messages means:

Let's list subsystems that must be reworked to provide compatibility:

All subsystem that must be compatible:

  1. PDS
    1. partition data
    2. WAL records
  2. metadata
    1. binary meta
    2. marshaller
  3. communication messages
  4. discovery messages
  5. binary marshaller format
  6. affinity results.
  7. management commands
    1. argument 
    2. results
    3. tasks (class names).

Current Ignite codebase

Code cleanup

Additional materials

Many distributed open source systems has rolling upgrade feature, already.
We must study implemented approaches to gain some insights from them.


  1. Is there rolling upgrade feature?
  2. How it implemented?
  3. How it tested?
  4. When it tested: Each PR? Weekly? Only on release?
  5. Network message format.
  6. Serdes implementation.
  7. How many earlier releases can be upgraded.

Apache Cassandra

  1. Rolling upgrade implemented. Guide -
    1. https://www.datastax.com/learn/whats-new-for-cassandra-4/migrating-cassandra-4x
    2. https://docs.datastax.com/en/luna-cassandra/guides/upgrade/overview.html
  2. Server-client compatibility works similar to Ignite Thin Client protocol.
  3. Compatibility checked with the special test framework - https://github.com/apache/cassandra-dtest/blob/trunk/upgrade_tests/README.md
    At a first glance, there are no special source code checks to ensure compatibility in day by day coding.
  4. On release or by request.
  5. POJO
  6. Internal serdes.
  7. ?

Apache Kafka

  1. Rolling upgrade implemented. Guide - https://kafka.apache.org/documentation/#upgrade
  2. Message formats checked on PR reivew. 
    At a first glance, there are no special source code checks to ensure compatibility in day by day coding.
    But, all machinery to code compatible implemented in code generation framework - https://github.com/apache/kafka/blob/trunk/clients/src/main/resources/common/message/AlterPartitionResponse.json
  3. Compatibility checked with the special test framework ducktest - https://github.com/apache/kafka/blob/trunk/tests/kafkatest/tests/core/kraft_upgrade_test.py
  4. On release or by request.
    Kafka doesn't provide public resources to run ducktests. Run done by contributors or by confluent employers on private hosts. 
  5. POJO
  6. Internal autogenerated serdes.
  7. ?

Yugabyte

  1. Rolling upgrade implemented. Doc - https://docs.yugabyte.com/preview/manage/upgrade-deployment/
  2. It seems compatibility checked on review (see commit message section "Upgrade/Rollback safety") - https://github.com/yugabyte/yugabyte-db/commit/e9ab17dea0d3b4f1673531c07404a290f9fbd8f2
  3. ???
  4. ???
  5. simple data structures.
  6. protobuf.
  7. ?

YDB

  1. Rolling upgrade implemented.
  2. Message formats checked on PR rivew - grpc+protobuf helps to maintain compatibility.
  3. Compatibility checked with the special test framework - https://github.com/ydb-platform/ydb/blob/main/ydb/tests/functional/restarts/
  4. On request. 
  5. simple data structures
  6. protobuf
  7. ?

Cockroach DB

  1. Rolling upgrade implemented.
  2. ?
  3. ?
  4. ?
  5. simple data structures.
  6. protobuf.
  7. ?

Hazelcast

  1. Rolling upgrade implemented
  2. ?
  3. ?
  4. ?
  5. ?
  6. ?
  7. ?

Alternative designs