github-actions[bot] commented on code in PR #62553:
URL: https://github.com/apache/doris/pull/62553#discussion_r3114834687


##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java:
##########
@@ -772,7 +789,18 @@ public void replayOnUpdated(StreamingInsertJob replayJob) {
         if (replayJob.getNonTxnJobStatistic() != null) {
             setNonTxnJobStatistic(replayJob.getNonTxnJobStatistic());
         }
+        if (replayJob.getSourceProperties() != null) {
+            this.sourceProperties = replayJob.getSourceProperties();
+            // Drop caches a former-master role may have populated; lazy 
re-init on next access.
+            this.convertedSourceProperties = null;
+        }
+        if (replayJob.getTargetProperties() != null) {
+            this.targetProperties = replayJob.getTargetProperties();
+        }
         setExecuteSql(replayJob.getExecuteSql());
+        // SQL-derived caches must be invalidated together so the next parse 
uses the replayed SQL.
+        this.baseCommand = null;

Review Comment:
   `baseCommand` and `originTvfProps` are invalidated here, but `encryptedSql` 
is another SQL-derived cache on the current in-memory job. Because 
`JobManager.replayUpdateJob()` mutates the existing object instead of replacing 
it, leaving `encryptedSql` untouched means a follower/new master can keep 
returning the pre-ALTER SQL from `getShowSQL()` after replay/failover. This 
cache should be cleared or copied from `replayJob` together with `executeSql`.



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AlterJobCommand.java:
##########
@@ -212,6 +212,36 @@ private void checkUnmodifiableSourceProperties(Map<String, 
String> originSourceP
                     sourceProperties.get(DataSourceConfigKeys.EXCLUDE_TABLES)),
                     "The exclude_tables property cannot be modified in ALTER 
JOB");
         }
+
+        // Reject keys that the runtime reads only at first initialize and 
never refreshes,
+        // so ALTER would be a silent no-op. See JdbcSourceOffsetProvider / 
DebeziumJsonDeserializer.

Review Comment:
   This new guard only covers the non-TVF `FROM ... TO DATABASE` path. The 
parallel `cdc_stream(...)` SQL path in `checkUnmodifiableProperties()` still 
allows `snapshot_parallelism`, `snapshot_split_size`, and 
`table.<tbl>.exclude_columns`, even though those are also read only during BE 
reader/deserializer initialization. The job-driven TVF path reuses the same 
`SourceReader` in `fs_brokers/cdc_client/common/Env.jobContexts`, and 
`fetchRecordStream()` does not close it for numeric job IDs, so a SQL ALTER of 
those keys is still a silent no-op there.



-- 
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