JNSimba commented on code in PR #63480:
URL: https://github.com/apache/doris/pull/63480#discussion_r3286864793
##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/DataSourceConfigValidator.java:
##########
@@ -109,8 +109,12 @@ public static void validateSource(Map<String, String>
input,
}
}
- // Cross-field: verify-ca must be paired with a CA cert; otherwise the
reader will
- // silently fall back to the JVM default truststore and likely fail to
connect.
+ validateSslVerifyCaPair(input);
Review Comment:
The SSL pair check is pre-existing — it sat at the end of `validateSource()`
on master and `AlterJobCommand` already called `validateSource()` with the
delta. This PR only extracts it into `validateSslVerifyCaPair(input)` so the
TVF path can reuse it; the cross-field semantics are unchanged.
The contract is intentional: `verify-ca` without a cert silently falls back
to the JVM default truststore, so we require `ssl_mode` and `ssl_rootcert` to
be declared together. This forces the user to re-state the cert when escalating
to verify-ca, catching a stale/missing cert at ALTER time instead of at the
next reader restart. It only fires when the delta sets `ssl_mode=verify-ca`;
changes that lower the mode or only touch the cert are unaffected.
##########
fe/fe-core/src/main/java/org/apache/doris/job/offset/jdbc/JdbcSourceOffsetProvider.java:
##########
@@ -87,7 +87,7 @@ public class JdbcSourceOffsetProvider implements
SourceOffsetProvider {
List<SnapshotSplit> remainingSplits = new ArrayList<>();
List<SnapshotSplit> finishedSplits = new ArrayList<>();
- JdbcOffset currentOffset;
+ volatile JdbcOffset currentOffset;
Review Comment:
Fixed in 33c780f217 by publishing `currentOffset` last. `updateOffset()` now
mutates all split fields and updates `remainingSplits`/`finishedSplits` inside
`splitsLock` first, then assigns the volatile `currentOffset` field. The
volatile write's happens-before guarantees readers (`getShowCurrentOffset()`,
`hasMoreDataToConsume()`, etc.) either observe the previous reference or a
fully constructed new one, never a half-populated `SnapshotSplit`.
--
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]