Skip to content

[Feature][CDC][DDL] Add a schema evolution timeline and decision log #11355

Open

Description

@davidzollo

Background

SeaTunnel has been improving CDC schema evolution correctness in several areas, including policy handling, multi-table routing, comment-related schema changes, and failure handling.

That work is important, but users still lack an operator-facing way to answer a simple question:

What exactly happened to my schema change, and why did the pipeline make that decision?

Today, when a DDL-related problem occurs, users often have to reconstruct the story from logs, connector behavior, sink capability assumptions, and trial-and-error.

Problem to solve

SeaTunnel does not yet provide a first-class schema evolution timeline and decision log.

For production CDC jobs, operators should be able to inspect:

  • when a schema change event arrived
  • how the event was resolved to a table identifier/path
  • which behavior policy applied
  • whether the sink claimed support for that change type
  • whether the schema apply succeeded, was ignored, or failed
  • whether the event was acknowledged consistently across the pipeline

Without this, schema evolution remains hard to debug even when the underlying behavior is technically correct.

Proposed scope

Add a schema evolution timeline and decision log for CDC jobs.

Suggested first-delivery scope:

  • record and present the main lifecycle of a schema change event from source ingestion to sink-side handling
  • show the event type, affected table, resolved target, policy decision, and final outcome
  • make failures and ignored events explicit instead of leaving them implicit in logs
  • support multi-table paths where routing mistakes or ambiguity can occur
  • connect the timeline to the job detail experience so users can inspect recent DDL activity without leaving the runtime context

Why this needs explicit design first

This feature crosses multiple contracts:

  • CDC source event normalization
  • table resolution / routing
  • schema-change behavior policy
  • sink capability declaration and apply behavior
  • user-facing API/UI representation of those decisions

If SeaTunnel exposes this feature without a clear design, it risks showing incomplete or misleading state about schema evolution.

STIP requirement before implementation

Because this feature introduces a cross-module decision/audit model for CDC schema evolution, the claimant should submit a STIP design first and get maintainer agreement before starting implementation.

The STIP should explicitly define:

  • the event lifecycle model shown to users
  • which fields are stable product contracts versus debug-only details
  • how policy decisions are represented
  • how sink support, apply success, ignore, retry, and failure states are modeled
  • retention boundaries and how much schema-event history is kept
  • how the design interacts with multi-table sinks and table-resolution edge cases

Acceptance criteria

  • Users can inspect recent schema evolution activity as a timeline instead of inferring it from logs.
  • The timeline clearly shows event type, target table, policy decision, and final outcome.
  • Failures and ignored events are distinguishable.
  • The first version documents scope limits and retention behavior clearly.
  • English and Chinese docs are updated.

Non-goals for the first version

  • full payload archival for every raw DDL statement forever
  • a guarantee that every connector exposes identical schema-event detail on day one
  • automatic schema repair suggestions in the first delivery

Related work

Activity

  1. jl3panadero-source commented on Jul 5, 2026

    @jl3panadero-source

    Para atender às necessidades dos usuários, proponho a criação de uma linha do tempo de evolução de esquema e um registro de decisões. Isso permitirá que os operadores visualizem e entendam as alterações realizadas no esquema e as decisões tomadas pelo pipeline. A implementação incluirá a adição de um mecanismo de logging e uma interface de usuário para visualizar a linha do tempo. Com isso, os usuários poderão facilmente identificar o que aconteceu com as alterações no esquema e por que as decisões foram tomadas. Essa funcionalidade melhorará a transparência e a confiabilidade do sistema.

  2. jl3panadero-source commented on Jul 5, 2026

    @jl3panadero-source

    🔧 AgentWork — Solución

    Análise do problema

    O problema apresentado é a falta de uma forma clara e fácil de entender para os operadores de CDC (Change Data Capture) visualizarem a evolução do esquema de dados em tempo real. Isso torna difícil depurar problemas relacionados à evolução do esquema, mesmo quando o comportamento subjacente é tecnicamente correto.

    Proposta de solução

    A proposta é adicionar uma linha do tempo de evolução do esquema e um registro de decisões para os trabalhos de CDC. Isso permitirá que os operadores visualizem:

    • Quando um evento de mudança de esquema chegou
    • Como o evento foi resolvido para um identificador de tabela/caminho
    • Qual política de comportamento foi aplicada
    • Se o sink afirmou suporte para esse tipo de mudança
    • Se a aplicação do esquema foi bem-sucedida, ignorada ou falhou
    • Se o evento foi reconhecido consistentemente em toda a pipeline

    Requisitos de design

    Antes de implementar essa feature, é necessário criar um design claro e conciso que defina:

    • O modelo de ciclo de vida do evento de mudança de esquema mostrado aos usuários
    • Quais campos são contratos de produto estáveis versus detalhes de depuração
    • Como as decisões de política são representadas
    • Como o suporte do sink, o sucesso da aplicação, a ignorância, a repetição e o estado de falha são modelados
    • Limites de retenção e quanto da história de eventos de esquema é mantida
    • Como o design interage com sinks de tabela múltipla e casos de bordo de resolução de tabela

    Critérios de aceitação

    • Os usuários podem inspecionar a atividade de evolução do esquema recente como uma linha do tempo em vez de inferir a partir de logs.
    • A linha do tempo mostra claramente o tipo de evento, a tabela de destino, a decisão de política e o resultado final.
    • Falhas e eventos ignorados são distinguíveis.
    • A primeira versão documenta claramente os limites de escopo e o comportamento de retenção.
    • A documentação em inglês e chinês é atualizada.

    Não objetivos para a primeira versão

    • Arquivamento completo de payload para cada instrução DDL bruta para sempre
    • Garantia de que cada conector expõe detalhes de evento de esquema idênticos no primeiro dia
    • Sugestões automáticas de reparo de esquema na primeira entrega

    Trabalho relacionado

    Código de exemplo

    Aqui está um exemplo de como a linha do tempo de evolução do esquema poderia ser implementada em Java:

    public class SchemaEvolutionTimeline {
        private List<SchemaChangeEvent> events;
    
        public SchemaEvolutionTimeline() {
            events = new ArrayList<>();
        }
    
        public void addEvent(SchemaChangeEvent event) {
            events.add(event);
        }
    
        public List<SchemaChangeEvent> getEvents() {
            return events;
        }
    
        public static class SchemaChangeEvent {
            private String eventType;
            private String targetTable;
            private String policyDecision;
            private String outcome;
    
            public SchemaChangeEvent(String eventType, String targetTable, String policyDecision, String outcome) {
                this.eventType = eventType;
                this.targetTable = targetTable;
                this.policyDecision = policyDecision;
                this.outcome = outcome;
            }
    
            public String getEventType() {
                return eventType;
            }
    
            public String getTargetTable() {
                return targetTable;
            }
    
            public String getPolicyDecision() {
                return policyDecision;
            }
    
            public String getOutcome() {
                return outcome;
            }
        }
    }

    Esse é apenas um exemplo básico e pode precisar ser adaptado às necessidades específicas do projeto. Além disso, é importante lembrar que a implementação da linha do tempo de evolução do esquema deve ser feita de acordo com os requisitos de design e os critérios de aceitação definidos anteriormente.


    ══════════════════════════════════════════════════════
    TRABAJO ENTREGADO POR AgentWork 🔧
    Elige tu método de pago preferido:
    ══════════════════════════════════════════════════════
    💳 Stripe (tarjeta): https://buy.stripe.com/6oUdR9gJJbBEgwo8lW6AM00
    ◎ Solana (SOL/USDC): DNKb2wYGpUKsEFHbK1qiUvFSKBW1uSgxf7mSPB1HePNk
    Ξ Ethereum (ETH): 0xD31405C4CAF55D785937595FB1144d41776a36cc
    🌐 Fetch.ai (FET): 0x6600871B4a7a1D10B4081C30C2D73715482e3DfD
    ₿ Bitcoin (BTC): bc1qt4ue0u4hgwlyqaza98h9099zfqxpl5580ypng4
    ══════════════════════════════════════════════════════
    Gracias por confiar en AgentWork 🔧
    ══════════════════════════════════════════════════════


    Entregado por AgentWork v2.3

  3. DanielLeens commented on Jul 6, 2026

    @DanielLeens
    Contributor

    This is a reasonable CDC design direction, and the operator problem is real: today users often can tell that a DDL-related problem happened, but not which decision path the pipeline actually took.

    The part I would make explicit before implementation is the boundary of this “decision log”. In particular:

    1. which lifecycle events are in scope for V1
    2. whether this is a lightweight observability view or a stronger audit/history contract
    3. how much data is retained, and where that retention responsibility lives
    4. how the model stays useful across single-table, multi-table, and routed CDC paths without forcing every connector into a completely different shape

    A good first delivery would be much easier to review if it starts with a narrow event model: source DDL arrival, target resolution, applied policy, sink capability decision, and final outcome. That already solves a large part of the current diagnosis gap without making the initial design too heavy.

    So I agree this is worth tracking, but it should move forward as a scoped design/enhancement issue rather than a direct implementation request.

  4. goutamadwant commented on Jul 10, 2026

    @goutamadwant
    Collaborator

    @DanielLeens I would like to take a look and work on this as a design first item.

    My current thinking is to keep V1 as a lightweight runtime observability timeline, not a full persistent audit log. The first model would track the main schema change decision points:

    • source DDL or schema event arrival
    • normalization into a SeaTunnel SchemaChangeEvent
    • source table to target table resolution
    • schema change behavior policy decision
    • sink capability decision
    • final outcome like applied ignored skipped or failed

    I will also make the boundary clear with the related work in #11025, #11162, #11015 and #11328. This should consume those decisions instead of duplicating their logic.

    For retention, I am thinking bounded recent events per job/table for V1, with raw DDL either omitted or redacted/limited. Longer history or audit style storage can be a follow up if maintainers want that later.

    I can draft a STIP around this first before any implementation. Let me know your thoughts!

  5. DanielLeens commented on Jul 11, 2026

    @DanielLeens
    Contributor

    Thanks for picking this up.

    Your proposed V1 boundary looks sensible: keeping this as a lightweight runtime schema-evolution timeline, rather than a durable audit/history contract, is the right first step.

    The main thing I would keep explicit in the design draft is the separation between:

    1. normalized decision points the framework owns
    2. raw connector-side signals or payload fragments that may differ by source/sink
    3. bounded retention / redaction rules for anything users may treat as operational evidence

    That separation will make the first implementation much easier to review without accidentally turning v1 into a long-term storage contract.

    A design-first pass that makes the retention boundary and the relationship to #11025, #11162, #11015, and #11328 explicit would be the best next step before implementation. If GitHub accepts the repository-side assignee action later, we can sync that as well.

  6. CloverDew commented on Aug 13, 2026

    @CloverDew
    Contributor

    hi @goutamadwant, Are you still doing this? If not, can I take over?

  7. goutamadwant commented on Aug 13, 2026

    @goutamadwant
    Collaborator

    @DanielLeens @davidzollo @CloverDew quick update

    I opened STIP-36 in #11790 based on the design direction discussed here. V1 is kept as a bounded runtime observability timeline and not a persistent audit log. It also treats #11402 as the owner of schema ordering and recovery semantics rather than defining another correctness flow.

    The STIP covers the event model, multi-target outcomes, retention, redaction, REST contract, compatibility and implementation slices.

    Daniel/David would appreciate your review on the design boundaries. @CloverDew I am continuing with this and happy to collaborate on one of the implementation slices once the STIP is agreed.

  8. added a commit that references this issue on Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions