hello-stephen commented on code in PR #69391:
URL: https://github.com/apache/doris/pull/69391#discussion_r4796891664
##########
fe/fe-core/src/main/java/org/apache/doris/load/routineload/kafka/KafkaRoutineLoadJob.java:
##########
@@ -196,6 +198,28 @@ private long convertedDefaultOffsetToLong() {
}
}
+ private static void checkPropertyBlacklist(Map<String, String> properties)
throws AnalysisException {
+ List<String> blockedProperties =
Arrays.asList(Config.routine_load_kafka_property_blacklist);
+ for (String key : properties.keySet()) {
+ // librdkafka reads the property name as a NUL-terminated string.
+ int nul = key.indexOf('\0');
+ String effectiveKey = nul < 0 ? key : key.substring(0, nul);
+ if (blockedProperties.contains(effectiveKey)) {
+ throw new AnalysisException("Kafka property '" + effectiveKey
+ "' is not allowed in Routine Load");
+ }
+ }
+ }
+
+ public void checkPropertiesAfterReplay() throws UserException {
+ // All journal entries have been applied and the master has not
started its schedulers yet.
+ try {
+ checkPropertyBlacklist(customProperties);
+ } catch (AnalysisException e) {
+ updateState(JobState.CANCELLED,
Review Comment:
[P2] Fence in-flight Cloud commits when cancelling a recovered job
If a BE is still finishing a task from the old master, cancelling here
removes the job's transaction callback. Without the cancellation,
`RoutineLoadJob.beforeCommitted` would reject the task because it isn't in the
promoted master's task list. For Cloud Routine Load,
`CloudGlobalTransactionMgr` skips that check when the callback is missing and
still forwards the transaction to Meta Service. The old task can then commit
rows and advance Kafka progress after the job shows as cancelled. A replacement
can ingest the same records even if it started from authoritative offsets read
at cancellation. Please fence outstanding commits for the cancelled job and
cover the failover case.
--
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]