hello-stephen commented on code in PR #71298:
URL: https://github.com/apache/doris/pull/71298#discussion_r4769039524


##########
regression-test/data/job_p0/streaming_job/cdc/test_streaming_postgres_type_contract.out:
##########
@@ -0,0 +1,48 @@
+-- Expected results inferred from the CDC type contract; not yet verified by 
execution.

Review Comment:
   [P2] Generate the regression expectations with the test runner
   
   This new result file explicitly says its contents were inferred without 
execution; the other changed CDC `.out` files carry equivalent notices. 
Repository testing rules require these files to be generated by the regression 
scripts. These suites exercise real Doris type parsing, CTAS, JSON ingestion, 
schema evolution and SSL, whereas the new mock-Doris integration tests cannot 
establish the actual SQL results. Please run the relevant suites through 
`run-regression-test.sh` and regenerate the changed expectations before 
treating them as regression coverage.



##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingJdbcUrlNormalizer.java:
##########
@@ -53,6 +58,11 @@ public static String appendDefaultParam(String jdbcUrl, 
String param, String val
     private static String normalizeMysql(String jdbcUrl) {
         String normalizedUrl = jdbcUrl.replace(" ", "");
         Set<String> params = getParams(normalizedUrl);
+        for (String param : params) {
+            if 
(UNSAFE_MYSQL_PARAMS.contains(param.toLowerCase(java.util.Locale.ROOT))) {
+                throw new IllegalArgumentException("JDBC URL property is not 
allowed for streaming sources: " + param);

Review Comment:
   [P2] Keep restored jobs droppable when URL validation fails
   
   An existing FROM-TO job can persist a previously accepted URL such as 
`jdbc:mysql://host/db?allowLoadLocalInfile=false`. After an FE restart, its 
transient converted-properties cache is empty, so 
`StreamingInsertJob.cleanup()` calls this new check through 
`buildProviderProperties()` and receives `IllegalArgumentException`. Cleanup 
catches only `JobException`; `JobManager.dropJobInternal()` therefore exits 
before removing the job or journaling its deletion. Even DROP JOB IF EXISTS 
fails, and ALTER cannot change this job's JDBC URL. Please keep cleanup 
possible for persisted configurations rejected by the new validation and add a 
restore-then-drop case.



##########
fs_brokers/cdc_client/src/main/java/org/apache/doris/cdcclient/service/TableSchemaService.java:
##########
@@ -0,0 +1,446 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.cdcclient.service;
+
+import org.apache.doris.cdcclient.common.Env;
+import org.apache.doris.cdcclient.source.factory.DataSource;
+import org.apache.doris.cdcclient.source.schema.CdcSourceColumn;
+import org.apache.doris.cdcclient.utils.CdcTypeMapper;
+import org.apache.doris.cdcclient.utils.ConfigUtil;
+import org.apache.doris.cdcclient.utils.PostgresNumericUtils;
+import org.apache.doris.job.cdc.CdcColumn;
+import org.apache.doris.job.cdc.CdcTableSchema;
+import org.apache.doris.job.cdc.DataSourceConfigKeys;
+import org.apache.doris.job.cdc.request.GetTableSchemasRequest;
+import org.apache.doris.job.cdc.response.GetTableSchemasResult;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+
+import com.mysql.cj.conf.ConnectionUrl;
+import org.springframework.stereotype.Service;
+
+/** Stateless source inspection and table-change preparation, without reader 
registration. */
+@Service
+public class TableSchemaService {
+    private static final Duration DEFAULT_JDBC_TIMEOUT = Duration.ofMinutes(1);
+
+    public GetTableSchemasResult getTableSchemas(GetTableSchemasRequest 
request)
+            throws SQLException {
+        DataSource source = 
DataSource.valueOf(request.getDataSource().toUpperCase(Locale.ROOT));
+        Map<String, String> config = request.getConfig();
+        if (request.getFrontendAddress() != null) {
+            
Env.getCurrentEnv().setFeMasterAddress(request.getFrontendAddress());
+        }
+        String schema =
+                config.get(
+                        source == DataSource.POSTGRES
+                                ? DataSourceConfigKeys.SCHEMA
+                                : DataSourceConfigKeys.DATABASE);
+        if (schema == null || schema.isEmpty()) {
+            throw new IllegalArgumentException("Source database/schema is 
required");
+        }
+        try (Connection connection = openConnection(source, config)) {
+            if (source == DataSource.OCEANBASE) {
+                validateOceanBase(connection);
+            }
+            List<String> tables = selectTables(discoverTables(connection, 
source, schema), config);
+            if (source == DataSource.POSTGRES && !request.isAlterTables()) {
+                PostgresSourceValidator.validate(
+                        connection,
+                        config,
+                        request.getJobId(),
+                        schema,
+                        tables,
+                        request.isCreateJob());
+            }
+            List<CdcTableSchema> schemas = new ArrayList<>();
+            for (String table : tables) {
+                List<String> keys = primaryKeys(connection, source, schema, 
table);
+                // Reject keyless job tables before changing the source 
publication.
+                if (request.isAlterTables() && keys.isEmpty()) {
+                    throw new IllegalArgumentException(
+                            "Source table requires a primary key: " + schema + 
"." + table);
+                }
+                List<CdcSourceColumn> columns = readColumns(connection, 
source, schema, table);
+                if (columns.isEmpty()) {
+                    throw new IllegalArgumentException(
+                            "Source schema is empty or inaccessible: " + 
schema + "." + table);
+                }
+                schemas.add(
+                        mapTable(
+                                source,
+                                source == DataSource.POSTGRES ? 
connection.getCatalog() : schema,
+                                source == DataSource.POSTGRES ? schema : null,
+                                table,
+                                columns,
+                                keys));
+            }
+            if (source == DataSource.POSTGRES && request.isAlterTables()) {
+                PostgresSourceValidator.ensurePublicationCoversTables(
+                        connection, config, request.getJobId(), schema, 
tables);
+            }
+            GetTableSchemasResult result = new GetTableSchemasResult();
+            result.setTables(schemas);
+            return result;
+        } catch (SQLException e) {
+            // Driver messages may contain URL credentials; expose stage and 
SQL state instead.
+            throw new SQLException(
+                    "Failed to inspect source schema "
+                            + schema
+                            + " (SQL state "
+                            + e.getSQLState()
+                            + ")",
+                    e.getSQLState(),
+                    e);
+        }
+    }
+
+    static List<String> selectTables(List<String> tables, Map<String, String> 
config) {
+        String selected = config.get(DataSourceConfigKeys.INCLUDE_TABLES);
+        if (selected == null || selected.trim().isEmpty()) {
+            selected = config.get(DataSourceConfigKeys.TABLE);
+        }
+        List<String> include = names(selected);
+        List<String> exclude = 
names(config.get(DataSourceConfigKeys.EXCLUDE_TABLES));
+        for (String name : include) {
+            if (!tables.contains(name)) {

Review Comment:
   [P2] Respect MySQL table-name case semantics in TVF discovery
   
   With MySQL `lower_case_table_names=1/2`, a standalone `cdc_stream` request 
for `table=ORDERS` can refer to the stored table `orders`. Discovery returns 
the canonical metadata spelling, but this new case-sensitive membership check 
rejects the request as nonexistent. Previously the TVF delegated table/column 
lookup to JDBC, and the CDC reader already consults the source's table-ID case 
sensitivity. Please resolve names using that source setting, retaining exact 
matching for PostgreSQL and case-sensitive MySQL; the new exact equality check 
in `CdcStreamTableValuedFunction.getTableColumns()` also needs to accept the 
resolved identity.



##########
fs_brokers/cdc_client/src/main/java/org/apache/doris/cdcclient/service/TableSchemaService.java:
##########
@@ -0,0 +1,446 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.cdcclient.service;
+
+import org.apache.doris.cdcclient.common.Env;
+import org.apache.doris.cdcclient.source.factory.DataSource;
+import org.apache.doris.cdcclient.source.schema.CdcSourceColumn;
+import org.apache.doris.cdcclient.utils.CdcTypeMapper;
+import org.apache.doris.cdcclient.utils.ConfigUtil;
+import org.apache.doris.cdcclient.utils.PostgresNumericUtils;
+import org.apache.doris.job.cdc.CdcColumn;
+import org.apache.doris.job.cdc.CdcTableSchema;
+import org.apache.doris.job.cdc.DataSourceConfigKeys;
+import org.apache.doris.job.cdc.request.GetTableSchemasRequest;
+import org.apache.doris.job.cdc.response.GetTableSchemasResult;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+
+import com.mysql.cj.conf.ConnectionUrl;
+import org.springframework.stereotype.Service;
+
+/** Stateless source inspection and table-change preparation, without reader 
registration. */
+@Service
+public class TableSchemaService {
+    private static final Duration DEFAULT_JDBC_TIMEOUT = Duration.ofMinutes(1);
+
+    public GetTableSchemasResult getTableSchemas(GetTableSchemasRequest 
request)
+            throws SQLException {
+        DataSource source = 
DataSource.valueOf(request.getDataSource().toUpperCase(Locale.ROOT));
+        Map<String, String> config = request.getConfig();
+        if (request.getFrontendAddress() != null) {
+            
Env.getCurrentEnv().setFeMasterAddress(request.getFrontendAddress());
+        }
+        String schema =
+                config.get(
+                        source == DataSource.POSTGRES
+                                ? DataSourceConfigKeys.SCHEMA
+                                : DataSourceConfigKeys.DATABASE);
+        if (schema == null || schema.isEmpty()) {
+            throw new IllegalArgumentException("Source database/schema is 
required");
+        }
+        try (Connection connection = openConnection(source, config)) {
+            if (source == DataSource.OCEANBASE) {
+                validateOceanBase(connection);
+            }
+            List<String> tables = selectTables(discoverTables(connection, 
source, schema), config);
+            if (source == DataSource.POSTGRES && !request.isAlterTables()) {
+                PostgresSourceValidator.validate(
+                        connection,
+                        config,
+                        request.getJobId(),
+                        schema,
+                        tables,
+                        request.isCreateJob());
+            }
+            List<CdcTableSchema> schemas = new ArrayList<>();
+            for (String table : tables) {
+                List<String> keys = primaryKeys(connection, source, schema, 
table);
+                // Reject keyless job tables before changing the source 
publication.
+                if (request.isAlterTables() && keys.isEmpty()) {
+                    throw new IllegalArgumentException(
+                            "Source table requires a primary key: " + schema + 
"." + table);
+                }
+                List<CdcSourceColumn> columns = readColumns(connection, 
source, schema, table);
+                if (columns.isEmpty()) {
+                    throw new IllegalArgumentException(
+                            "Source schema is empty or inaccessible: " + 
schema + "." + table);
+                }
+                schemas.add(
+                        mapTable(
+                                source,
+                                source == DataSource.POSTGRES ? 
connection.getCatalog() : schema,
+                                source == DataSource.POSTGRES ? schema : null,
+                                table,
+                                columns,
+                                keys));
+            }
+            if (source == DataSource.POSTGRES && request.isAlterTables()) {
+                PostgresSourceValidator.ensurePublicationCoversTables(
+                        connection, config, request.getJobId(), schema, 
tables);
+            }
+            GetTableSchemasResult result = new GetTableSchemasResult();
+            result.setTables(schemas);
+            return result;
+        } catch (SQLException e) {
+            // Driver messages may contain URL credentials; expose stage and 
SQL state instead.
+            throw new SQLException(
+                    "Failed to inspect source schema "
+                            + schema
+                            + " (SQL state "
+                            + e.getSQLState()
+                            + ")",
+                    e.getSQLState(),
+                    e);
+        }
+    }
+
+    static List<String> selectTables(List<String> tables, Map<String, String> 
config) {
+        String selected = config.get(DataSourceConfigKeys.INCLUDE_TABLES);
+        if (selected == null || selected.trim().isEmpty()) {
+            selected = config.get(DataSourceConfigKeys.TABLE);
+        }
+        List<String> include = names(selected);
+        List<String> exclude = 
names(config.get(DataSourceConfigKeys.EXCLUDE_TABLES));
+        for (String name : include) {
+            if (!tables.contains(name)) {
+                throw new IllegalArgumentException(
+                        "Source table does not exist or is inaccessible: " + 
name);
+            }
+        }
+        List<String> result =
+                tables.stream()
+                        .filter(
+                                t ->
+                                        !include.isEmpty()
+                                                ? include.contains(t)
+                                                : !exclude.contains(t))
+                        .collect(Collectors.toList());
+        if (result.isEmpty()) {
+            throw new IllegalArgumentException("No matching source tables 
found");
+        }
+        return result;
+    }
+
+    private static List<String> names(String value) {
+        return value == null || value.trim().isEmpty()
+                ? Collections.emptyList()
+                : Arrays.stream(value.split(","))
+                        .map(String::trim)
+                        .filter(s -> !s.isEmpty())
+                        .collect(Collectors.toList());
+    }
+
+    static List<String> discoverTables(Connection connection, DataSource 
source, String schema)
+            throws SQLException {
+        boolean postgres = source == DataSource.POSTGRES;
+        String catalog = postgres ? connection.getCatalog() : schema;
+        String[] tableTypes =
+                postgres ? new String[] {"TABLE", "PARTITIONED TABLE"} : new 
String[] {"TABLE"};
+        DatabaseMetaData metadata = connection.getMetaData();
+        String schemaPattern = schema;
+        if (postgres) {
+            String escape = metadata.getSearchStringEscape();
+            schemaPattern = schema.replace(escape, escape + escape);
+        }
+        List<String> tables = new ArrayList<>();
+        // Connector/J uses either catalog or schema according to databaseTerm.
+        try (ResultSet rs = metadata.getTables(catalog, schemaPattern, null, 
tableTypes)) {
+            while (rs.next()) {
+                if (schema.equals(rs.getString("TABLE_SCHEM"))
+                        || (!postgres && 
schema.equals(rs.getString("TABLE_CAT")))) {
+                    tables.add(rs.getString("TABLE_NAME"));
+                }
+            }
+        }
+        return tables;
+    }
+
+    static List<String> primaryKeys(
+            Connection connection, DataSource source, String schema, String 
table)
+            throws SQLException {
+        Map<Integer, String> keys = new TreeMap<>();
+        try (ResultSet rs =
+                connection
+                        .getMetaData()
+                        .getPrimaryKeys(
+                                source == DataSource.POSTGRES ? 
connection.getCatalog() : schema,
+                                schema,
+                                table)) {
+            while (rs.next()) {
+                keys.put(rs.getInt("KEY_SEQ"), rs.getString("COLUMN_NAME"));
+            }
+        }
+        return new ArrayList<>(keys.values());
+    }
+
+    private static List<CdcSourceColumn> readColumns(
+            Connection connection, DataSource source, String schema, String 
table)
+            throws SQLException {
+        return source == DataSource.POSTGRES
+                ? readPostgresColumns(connection, schema, table)
+                : readMysqlColumns(connection, schema, table);
+    }
+
+    static List<CdcSourceColumn> readPostgresColumns(
+            Connection connection, String schema, String table) throws 
SQLException {
+        List<CdcSourceColumn> columns = new ArrayList<>();
+        DatabaseMetaData metadata = connection.getMetaData();
+        String escape = metadata.getSearchStringEscape();
+        try (ResultSet rs =
+                metadata.getColumns(
+                        connection.getCatalog(),
+                        schema.replace(escape, escape + escape),
+                        table.replace(escape, escape + escape),
+                        null)) {
+            while (rs.next()) {
+                // JDBC schema/table arguments are patterns, so retain only 
the exact source table.
+                if (!schema.equals(rs.getString("TABLE_SCHEM"))
+                        || !table.equals(rs.getString("TABLE_NAME"))) {
+                    continue;
+                }
+                String type = rs.getString("TYPE_NAME");
+                Integer scale = integer(rs, "DECIMAL_DIGITS");
+                if (scale != null && (type.equals("numeric") || 
type.equals("_numeric"))) {
+                    scale = PostgresNumericUtils.normalizeScale(scale);
+                }
+                Integer size = integer(rs, "COLUMN_SIZE");
+                CdcSourceColumn column =
+                        CdcSourceColumn.builder()
+                                .name(rs.getString("COLUMN_NAME"))
+                                .nativeType(type)
+                                .length(size)
+                                .precision(size)
+                                .scale(scale)
+                                
.nullable("YES".equals(rs.getString("IS_NULLABLE")))
+                                .comment(rs.getString("REMARKS"))
+                                .build();
+                if (rs.getInt("DATA_TYPE") == Types.ARRAY) {
+                    column.setArrayDimensions(
+                            readPostgresArrayDimensions(
+                                    connection, schema, table, 
column.getName()));
+                }
+                columns.add(column);
+            }
+        }
+        return columns;
+    }
+
+    private static int readPostgresArrayDimensions(
+            Connection connection, String schema, String table, String column) 
throws SQLException {
+        // JDBC exposes element precision/scale, but not the declared array 
dimensions.
+        String query =
+                "SELECT a.attndims FROM pg_catalog.pg_attribute a "
+                        + "JOIN pg_catalog.pg_class c ON c.oid=a.attrelid "
+                        + "JOIN pg_catalog.pg_namespace n ON 
n.oid=c.relnamespace "
+                        + "WHERE n.nspname=? AND c.relname=? AND a.attname=? 
AND NOT a.attisdropped";
+        try (PreparedStatement stmt = connection.prepareStatement(query)) {
+            stmt.setString(1, schema);
+            stmt.setString(2, table);
+            stmt.setString(3, column);
+            try (ResultSet rs = stmt.executeQuery()) {
+                if (!rs.next()) {
+                    throw new SQLException(
+                            "Source column disappeared while reading array 
dimensions: "
+                                    + schema
+                                    + "."
+                                    + table
+                                    + "."
+                                    + column);
+                }
+                return Math.max(1, rs.getInt("attndims"));
+            }
+        }
+    }
+
+    static List<CdcSourceColumn> readMysqlColumns(
+            Connection connection, String schema, String table) throws 
SQLException {
+        List<CdcSourceColumn> columns = new ArrayList<>();
+        try (ResultSet rs = connection.getMetaData().getColumns(schema, 
schema, table, null)) {
+            while (rs.next()) {
+                // JDBC treats '_' and '%' in table/schema names as pattern 
wildcards.
+                if (!table.equals(rs.getString("TABLE_NAME"))
+                        || !(schema.equals(rs.getString("TABLE_CAT"))
+                                || 
schema.equals(rs.getString("TABLE_SCHEM")))) {
+                    continue;
+                }
+                String type = 
rs.getString("TYPE_NAME").toUpperCase(Locale.ROOT);
+                Integer size = integer(rs, "COLUMN_SIZE");
+                CdcSourceColumn column =
+                        CdcSourceColumn.builder()
+                                .name(rs.getString("COLUMN_NAME"))
+                                .nativeType(type)
+                                .length(size)
+                                .precision(size)
+                                .scale(integer(rs, "DECIMAL_DIGITS"))
+                                .unsigned(type.contains("UNSIGNED"))
+                                
.nullable("YES".equals(rs.getString("IS_NULLABLE")))
+                                .comment(rs.getString("REMARKS"))
+                                .build();
+                if (type.equals("DATETIME") || type.equals("TIMESTAMP")) {
+                    // Connector/J reports 19 characters, then '.' and 
fractional digits.
+                    column.setScale(Math.max(0, size - 20));
+                }
+                columns.add(column);
+            }
+        }
+        return columns;
+    }
+
+    private static Integer integer(ResultSet rs, String column) throws 
SQLException {
+        int value = rs.getInt(column);
+        return rs.wasNull() ? null : value;
+    }
+
+    static CdcTableSchema mapTable(
+            DataSource source,
+            String database,
+            String schema,
+            String table,
+            List<CdcSourceColumn> columns,
+            List<String> keys) {
+        CdcTableSchema result = new CdcTableSchema();
+        result.setDatabaseName(database);
+        result.setSchemaName(schema);
+        result.setTableName(table);
+        result.setPrimaryKeys(keys);
+        result.setMappingErrors(new LinkedHashMap<>());
+        List<CdcColumn> mapped = new ArrayList<>();
+        CdcTypeMapper mapper = CdcTypeMapper.forSource(source);
+        for (CdcSourceColumn column : columns) {
+            CdcColumn target =
+                    new CdcColumn(
+                            column.getName(),
+                            column.getNativeType(),
+                            null,
+                            isTargetNullable(source, column),
+                            column.getComment());
+            try {
+                target.setDorisType(mapper.map(column, 
keys.contains(column.getName())));
+            } catch (CdcTypeMapper.UnsupportedTypeException e) {
+                result.getMappingErrors().put(column.getName(), 
e.getMessage());
+            }
+            mapped.add(target);
+        }
+        result.setColumns(mapped);
+        return result;
+    }
+
+    private static boolean isTargetNullable(DataSource source, CdcSourceColumn 
column) {
+        // Preserve the existing target policy without changing the source 
metadata.
+        if (column.isNullable()) {
+            return true;
+        }
+        String type = column.getNativeType();
+        if (source == DataSource.POSTGRES) {
+            return "timestamptz".equals(type);

Review Comment:
   [P2] Align numeric target nullability with the new converter
   
   For a source `t(id INT PRIMARY KEY, n NUMERIC NOT NULL)`, PostgreSQL permits 
`n = 'NaN'` (and unbounded NUMERIC also permits infinities). The new 
`PostgresNumericConverter` turns these values into JSON null, but this branch 
leaves the generated target column NOT NULL. 
`StreamingJobUtils.toCdcColumnDefinition` preserves that flag, so the real 
Doris sink rejects the row and the job cannot advance with the default 
filtering policy. The special-value tests use nullable NUMERIC and a mock Doris 
receiver, which misses this combination. Please align generated numeric 
nullability with the converter's NULL policy and cover a NOT NULL source 
against the generated target.



##########
fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/StreamingJobAction.java:
##########
@@ -83,30 +88,60 @@ public Object reportTaskFailure(@RequestBody 
TaskFailureRequest failureRequest,
     }
 
     @RequestMapping(path = "/api/streaming/schema_change", method = 
RequestMethod.POST)
-    public Object executeSchemaChange(@RequestBody Map<String, String> body, 
HttpServletRequest request) {
+    public Object executeSchemaChange(@RequestBody AlterTableRequest body, 
HttpServletRequest request) {

Review Comment:
   [P2] Preserve schema-change requests across rolling upgrades
   
   When FE is upgraded while a BE's CDC client is still on the base version, 
that client posts `{"stmt": "ALTER TABLE ..."}` to this unchanged endpoint. The 
new handler requires `tableName` and `operation`, so the next ADD/DROP is 
rejected and synchronization pauses before offset commit. Upgrading BE first 
fails in the opposite direction: the new structured body has no `stmt` for the 
old FE. The target-schema idempotence fallback cannot rescue a new ADD whose 
column is still absent. Please provide a versioned or transitional protocol 
supporting both upgrade orders, with mixed-version request tests.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to