You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by "gfphoenix78 (via GitHub)" <gi...@apache.org> on 2025/09/29 03:34:20 UTC
[PR] Add hooks to support extensible interconnect [cloudberry]
gfphoenix78 opened a new pull request, #1375:
URL: https://github.com/apache/cloudberry/pull/1375
The interconnect module is traditionally single-thread. It's hard to refactor/replace the current implementation for thread-safe.
This commit adds hooks to support extensible interconnect. The hooks contain 3 functions in struct ExtInterconnectFuncs:
struct ExtInterconnectFuncs {
void (*init)();
int (*port)();
void (*exit)();
};
init: create socket to receive interconnect packets.
port: return the port number created in init.
exit: disconnect all interconnections and cleanup related resources.
<!-- Thank you for your contribution to Apache Cloudberry (Incubating)! -->
Fixes #ISSUE_Number
### What does this PR do?
<!-- Brief overview of the changes, including any major features or fixes -->
### Type of Change
- [ ] Bug fix (non-breaking change)
- [ ] New feature (non-breaking change)
- [ ] Breaking change (fix or feature with breaking changes)
- [ ] Documentation update
### Breaking Changes
<!-- Remove if not applicable. If yes, explain impact and migration path -->
### Test Plan
<!-- How did you test these changes? -->
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Passed `make installcheck`
- [ ] Passed `make -C src/test installcheck-cbdb-parallel`
### Impact
<!-- Remove sections that don't apply -->
**Performance:**
<!-- Any performance implications? -->
**User-facing changes:**
<!-- Any changes visible to users? -->
**Dependencies:**
<!-- New dependencies or version changes? -->
### Checklist
- [ ] Followed [contribution guide](https://cloudberry.apache.org/contribute/code)
- [ ] Added/updated documentation
- [ ] Reviewed code for security implications
- [ ] Requested review from [cloudberry committers](https://github.com/orgs/apache/teams/cloudberry-committers)
### Additional Context
<!-- Any other information that would help reviewers? Remove if none -->
### CI Skip Instructions
<!--
To skip CI builds, add the appropriate CI skip identifier to your PR title.
The identifier must:
- Be in square brackets []
- Include the word "ci" and either "skip" or "no"
- Only use for documentation-only changes or when absolutely necessary
-->
---
<!-- Join our community:
- Mailing list: [dev@cloudberry.apache.org](https://lists.apache.org/list.html?dev@cloudberry.apache.org) (subscribe: dev-subscribe@cloudberry.apache.org)
- Discussions: https://github.com/apache/cloudberry/discussions -->
--
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: commits-unsubscribe@cloudberry.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org
Re: [PR] WIP: Add hooks to support extensible interconnect [cloudberry]
Posted by "gfphoenix78 (via GitHub)" <gi...@apache.org>.
gfphoenix78 closed pull request #1375: WIP: Add hooks to support extensible interconnect
URL: https://github.com/apache/cloudberry/pull/1375
--
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: commits-unsubscribe@cloudberry.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org
Re: [PR] Add hooks to support extensible interconnect [cloudberry]
Posted by "my-ship-it (via GitHub)" <gi...@apache.org>.
my-ship-it commented on code in PR #1375:
URL: https://github.com/apache/cloudberry/pull/1375#discussion_r2428497315
##########
src/include/cdb/cdbconn.h:
##########
@@ -37,24 +37,25 @@ typedef struct SegmentDatabaseDescriptor
*/
int32 segindex;
- /*
+ /*
* A non-NULL value points to the PGconn block of a successfully
* established connection to the segment database.
*/
PGconn *conn;
- /*
- * Connection info saved at most recent PQconnectdb.
- *
- * NB: Use malloc/free, not palloc/pfree, for the items below.
- */
- uint32 motionListener; /* interconnect listener port */
- int32 backendPid;
- char *whoami; /* QE identifier for msgs */
- bool isWriter;
- int identifier; /* unique identifier in the cdbcomponent segment pool */
- double establishConnTime; /* the time of establish connection to the segment,
- * -1 means this connection is cached */
+ /*
+ * Connection info saved at most recent PQconnectdb.
+ *
+ * NB: Use malloc/free, not palloc/pfree, for the items below.
+ */
+ uint32 motionListener; /* interconnect listener port */
Review Comment:
Unnecessary format changes
--
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: commits-unsubscribe@cloudberry.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org
Re: [PR] WIP: Add hooks to support extensible interconnect [cloudberry]
Posted by "my-ship-it (via GitHub)" <gi...@apache.org>.
my-ship-it commented on code in PR #1375:
URL: https://github.com/apache/cloudberry/pull/1375#discussion_r2431786910
##########
src/include/cdb/cdbconn.h:
##########
@@ -37,24 +37,25 @@ typedef struct SegmentDatabaseDescriptor
*/
int32 segindex;
- /*
+ /*
* A non-NULL value points to the PGconn block of a successfully
* established connection to the segment database.
*/
PGconn *conn;
- /*
- * Connection info saved at most recent PQconnectdb.
- *
- * NB: Use malloc/free, not palloc/pfree, for the items below.
- */
- uint32 motionListener; /* interconnect listener port */
- int32 backendPid;
- char *whoami; /* QE identifier for msgs */
- bool isWriter;
- int identifier; /* unique identifier in the cdbcomponent segment pool */
- double establishConnTime; /* the time of establish connection to the segment,
- * -1 means this connection is cached */
+ /*
+ * Connection info saved at most recent PQconnectdb.
+ *
+ * NB: Use malloc/free, not palloc/pfree, for the items below.
+ */
+ uint32 motionListener; /* interconnect listener port */
Review Comment:
So do we need to keep the original format consistent with the rest of the structure?
--
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: commits-unsubscribe@cloudberry.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org
Re: [PR] Add hooks to support extensible interconnect [cloudberry]
Posted by "gfphoenix78 (via GitHub)" <gi...@apache.org>.
gfphoenix78 commented on code in PR #1375:
URL: https://github.com/apache/cloudberry/pull/1375#discussion_r2430968470
##########
src/include/cdb/cdbconn.h:
##########
@@ -37,24 +37,25 @@ typedef struct SegmentDatabaseDescriptor
*/
int32 segindex;
- /*
+ /*
* A non-NULL value points to the PGconn block of a successfully
* established connection to the segment database.
*/
PGconn *conn;
- /*
- * Connection info saved at most recent PQconnectdb.
- *
- * NB: Use malloc/free, not palloc/pfree, for the items below.
- */
- uint32 motionListener; /* interconnect listener port */
- int32 backendPid;
- char *whoami; /* QE identifier for msgs */
- bool isWriter;
- int identifier; /* unique identifier in the cdbcomponent segment pool */
- double establishConnTime; /* the time of establish connection to the segment,
- * -1 means this connection is cached */
+ /*
+ * Connection info saved at most recent PQconnectdb.
+ *
+ * NB: Use malloc/free, not palloc/pfree, for the items below.
+ */
+ uint32 motionListener; /* interconnect listener port */
Review Comment:
The mix usage of tabs and spaces messes up the code.
--
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: commits-unsubscribe@cloudberry.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org