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


##########
fs_brokers/cdc_client/src/main/java/org/apache/doris/cdcclient/common/Env.java:
##########
@@ -79,6 +96,19 @@ public SourceReader getReaderIfPresent(String jobId) {
         return context == null ? null : context.reader;
     }
 
+    /**
+     * Reader for stateless metadata ops (end offset / compare): reuse the 
live one if present, else
+     * a throwaway instance. Never create/cache/initialize a heavy reader, so 
a metadata RPC for an
+     * idle/absent job can't trigger pub/slot/schema (re)initialization or 
leak an unreaped context.
+     */
+    public SourceReader getMetaReader(JobBaseConfig jobConfig) {

Review Comment:
   This metadata path drops the side effect that `getReader()` and 
`getReaderAndClaim()` both perform: copying `jobConfig.getFrontendAddress()` 
into `Env.feMasterAddress`. That address is required when FE has converted 
`ssl_root_cert` to a `FILE:<id>:<md5>` reference; `/api/fetchEndOffset` now 
calls `getMetaReader()`, then `PostgresSourceReader.getEndOffset()` / 
`MySqlSourceReader.getEndOffset()` builds the source config, which calls 
`SmallFileMgr.getFilePath()` and reads `Env.getFeMasterAddress()`. On a fresh 
cdc_client process, or after routing the metadata heartbeat to a newly bound BE 
that has not yet handled `initReader`/`writeRecords`, this is still null and 
the metadata RPC fails with `feMasterAddress is required`, pausing SSL CDC jobs 
before polling. Please preserve the frontend address update in 
`getMetaReader()` before returning either an existing or throwaway reader.



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