Skip to content

WIP: Add hooks to support extensible interconnect#1375

Closed
gfphoenix78 wants to merge 1 commit into
apache:mainfrom
gfphoenix78:ext-ic
Closed

WIP: Add hooks to support extensible interconnect#1375
gfphoenix78 wants to merge 1 commit into
apache:mainfrom
gfphoenix78:ext-ic

Conversation

@gfphoenix78
Copy link
Copy Markdown
Contributor

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.

Fixes #ISSUE_Number

What does this PR do?

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

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


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.
Comment thread src/include/cdb/cdbconn.h
*
* NB: Use malloc/free, not palloc/pfree, for the items below.
*/
uint32 motionListener; /* interconnect listener port */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary format changes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mix usage of tabs and spaces messes up the code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So do we need to keep the original format consistent with the rest of the structure?

Copy link
Copy Markdown
Contributor

@my-ship-it my-ship-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except one minor comment

@gfphoenix78 gfphoenix78 changed the title Add hooks to support extensible interconnect WIP: Add hooks to support extensible interconnect Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants