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


##########
fs_brokers/cdc_client/src/main/java/org/apache/doris/cdcclient/source/reader/oceanbase/OceanBaseSourceReader.java:
##########
@@ -0,0 +1,30 @@
+// 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.source.reader.oceanbase;
+
+import org.apache.doris.cdcclient.source.reader.mysql.MySqlSourceReader;
+
+public class OceanBaseSourceReader extends MySqlSourceReader {

Review Comment:
   [P2] Resolve symbolic startup offsets only before the first concrete 
checkpoint
   
   This subclass inherits the `latest`/`earliest` path where FE keeps the 
symbolic offset in config but supplies the committed concrete offset in request 
meta. Every task calls `createBinlogSplit()` before the live-reader reuse 
guard, so `getSourceConfig()` resolves the symbol through a fresh JDBC 
connect/query/close; only afterward is the concrete meta offset selected and 
the existing reader reused. At the default ten-second window this creates 
persistent connection churn and lets a transient new-connection failure stop an 
otherwise healthy stream. Please skip symbolic discovery when meta already has 
a valid start, and add a multi-window test that asserts discovery runs only 
once.



##########
fe/fe-core/src/main/java/org/apache/doris/job/util/StreamingJobUtils.java:
##########
@@ -591,10 +583,15 @@ public static void 
populateDefaultSourceProperties(DataSourceType sourceType,
         }
     }
 
+    /**
+     * The remoteDB implementation differs for each data source;
+     * refer to the hierarchical mapping in the JDBC catalog.
+     */
     public static String getRemoteDbName(DataSourceType sourceType, 
Map<String, String> properties) {
         String remoteDb = null;
         switch (sourceType) {
             case MYSQL:
+            case OCEANBASE:

Review Comment:
   [P2] Close the OceanBase schema-discovery client
   
   This new branch admits OceanBase into `generateCreateTableCmds()`, which 
creates a Hikari-backed `JdbcClient` and performs table/column metadata calls, 
but never invokes `closeClient()` on either the return path or any validation 
exception. The preceding compatibility preflight closes a different client, so 
each successful CREATE retains a pool/idle source connection and repeated 
failed CREATEs accumulate FE pool threads/connections. Please close this client 
in a `finally`/try-with-resources covering all metadata exits and test success 
plus an exception path.



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