Skip to content

[#383] Add clustering daemon integration, backup discovery, and documentation - #1747

Closed
manishpatel00 wants to merge 2 commits into
pgmoneta:mainfrom
manishpatel00:issue383_clustering_part2
Closed

manishpatel00 wants to merge 2 commits into
pgmoneta:mainfrom
manishpatel00:issue383_clustering_part2

Conversation

@manishpatel00

Copy link
Copy Markdown
Contributor

Follows #1745
Fixes #383

Description

Delivers Part 2 of clustering support for node synchronization:

  • Daemon Integration: Clustering socket binding and listening on config->clustering, connection acceptance callback (accept_clustering_cb), and periodic node synchronization dispatch (clustering_cb) in src/main.c.
  • Backup Discovery: Protocol command CLUSTERING_GET_BACKUPS request and response handling (pgmoneta_clustering_request_get_backups, pgmoneta_clustering_response_get_backups) and node worker loop (pgmoneta_clustering_run) in src/libpgmoneta/clustering.c.
  • Metadata Tracking: INFO_OWNER recording in backup.info, struct field owner in struct backup, and exposure through the management API via MANAGEMENT_ARGUMENT_OWNER.
  • Documentation & Unit Tests: Configuration manuals (doc/CONFIGURATION.md, doc/manual/en/04-configuration.md, doc/man/pgmoneta.conf.5.rst), architecture overview (doc/manual/en/72-architecture.md), and MCTF unit tests in test/testcases/test_clustering.c.

…upport

Introduce foundational clustering support for node synchronization:

1. Bitset: Add a bounds-safe bitset data structure (bitset.h, bitset.c)
   for tracking chunk streaming and transfer states, with unit tests in
   test_bitset.c.
2. Configuration: Add clustering settings (clustering, clustering_id,
   clustering_nodes, clustering_base_dir) to main_configuration, server
   configuration, INI parser, reload transfer, and validation rules.
3. Wire Protocol Framing: Add JSON framing for clustering commands
   (CLUSTERING_GET_ID, CLUSTERING_GET_SERVERS), outcome responses, and
   active node discovery (pgmoneta_clustering_check_active).

Fixes pgmoneta#383

Signed-off-by: Manish Kumar <[email protected]>
…nd documentation

Add daemon integration and backup discovery for clustering support:

1. Daemon Integration: Add clustering socket binding, listener callback
   (accept_clustering_cb), and periodic clustering worker dispatch (clustering_cb)
   in src/main.c.
2. Backup Discovery: Implement CLUSTERING_GET_BACKUPS command request and response
   framing with server backup listing in src/libpgmoneta/clustering.c.
3. Metadata & Tracking: Record OWNER in backup.info (INFO_OWNER, struct backup)
   and expose via management API (MANAGEMENT_ARGUMENT_OWNER).
4. Documentation & Tests: Document clustering configuration parameters and wire
   protocol framing, with unit tests in test_clustering.c.

Fixes pgmoneta#383

Signed-off-by: Manish Kumar <[email protected]>
@ecleon26

ecleon26 commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

same here, closing - read the reasons on #1751

@manishpatel00

Copy link
Copy Markdown
Contributor Author

@ecleon26 I have read the reasons on #1751 and posted a consolidated response covering both closed PRs here: #1745 (comment) . Could you clarify the accepted scope for any reusable work or follow-up contribution before I revise this further?

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.

Clustering support

2 participants