zhan7236 opened a new pull request, #1457:
URL: https://github.com/apache/cloudberry/pull/1457

   ## Summary
   
   This PR addresses Issue #1389 by preventing auxiliary background worker 
processes from opening unnecessary network sockets during interconnect 
initialization.
   
   ## Problem
   
   Auxiliary background workers (ftsprobe, global deadlock detector, dtx 
recovery, sweeper, pg_cron launcher, ic proxy) were initializing the Motion 
Layer IPC, which opens network sockets for data exchange. Since these processes 
don't require interconnect communication, this behavior is unnecessary and can 
be considered a security concern.
   
   ## Solution
   
   Added a check for `amAuxiliaryBgWorker()` in both `cdb_setup()` and 
`cdb_cleanup()` functions to skip interconnect initialization and cleanup for 
auxiliary background workers.
   
   ### Changes:
   - Modified `src/backend/cdb/cdbutil.c`:
     - Added `!amAuxiliaryBgWorker()` condition to `cdb_setup()` to skip 
`InitMotionLayerIPC()` call
     - Added `!amAuxiliaryBgWorker()` condition to `cdb_cleanup()` to skip 
`CleanUpMotionLayerIPC()` call
     - Applied to both `#ifdef USE_INTERNAL_FTS` and `#else` code paths
   
   ## Testing
   
   - Code review verified correct syntax and logic
   - Header file `postmaster/postmaster.h` already included in cdbutil.c
   - Function `amAuxiliaryBgWorker()` properly declared in postmaster.h
   
   Fixes #1389


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