Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:4paradigm OpenMLDB Cluster Operation Verification

From Leeroopedia
Knowledge Sources
Domains Cluster_Operations, DevOps
Last Updated 2026-10-12 12:00 GMT

Overview

A verification methodology for confirming that cluster management operations (recovery, scaling, upgrades) have completed successfully by polling operation status and validating table integrity.

Description

Cluster operation verification is the practice of systematically checking that every operation initiated by a management command has reached a terminal state (kDone or kFailed) and that table health is consistent. In OpenMLDB, this involves polling ShowOpStatus until no operations are in kDoing or kInited state, then running CheckTable to verify all partitions are alive with correct leader/follower roles. This principle ensures that operations are not just initiated but actually completed before proceeding to the next step.

Usage

Use this principle after any cluster management operation — data recovery, scaling, or rolling upgrade. It provides the confirmation needed before re-enabling auto-failover or proceeding with the next operation.

Theoretical Basis

Operation verification follows the polling pattern with terminal state detection:

Verified=∀op∈Ops:op.status∈{kDone,kFailed}∧∀table:Healthy(table)

Pseudo-code for operation verification:

# Abstract algorithm (NOT real implementation)
def verify_operations(cluster):
    while True:
        all_done = True
        for db in all_databases(cluster):
            ops = show_op_status(db)
            for op in ops:
                if op.status in ["kDoing", "kInited"]:
                    all_done = False
                    log("waiting for op:", op.id)
                    break
            if not all_done:
                break
        if all_done:
            break
        sleep(2)

    # Verify table health
    for db in all_databases(cluster):
        for table in all_tables(db):
            status = check_table(db, table)
            if not status.ok:
                log_error("table unhealthy:", table)

Practical Guide

  • Use GetOpStatus(executor, db, filter, wait_done=True) to block until all operations complete
  • The CheckTable function verifies: all partitions alive, leader/follower roles match tablet status
  • The WaitingOP method polls ShowOpStatus for a specific table until operations complete
  • If any operation reaches kFailed, investigate the error before proceeding
  • After verification, re-enable auto-failover to restore self-healing

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment