Skip to content

DM-55404: A low-latency synchronization mechanism on the data management events sent by the Replication/Ingest system to Czar in Qserv#1033

Merged
iagaponenko merged 4 commits into
mainfrom
tickets/DM-55404
Jul 17, 2026
Merged

Conversation

@iagaponenko

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a low-latency event-notification path from the Replication/Ingest subsystem to the Czar, so Czar-side components (notably CSS cache) can react promptly to data-management events (publish/delete), and centralizes chunk-disposition (“chunk map”) updates into a dedicated service.

Changes:

  • Bump the management/replication REST API version to 57 across UI, C++ HTTP meta modules, and the Python admin interface.
  • Add ChunkMap as a replica service (lazy-created via ServiceProvider) and refactor replication task chunk-map updates to use it.
  • Add cconfig::EventService and cconfig::DataManagementEvent, plus a new Czar /event endpoint and a Replication-side request (PostEventQservCzarMgtRequest) to post events to Czars.

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/www/qserv/js/Common.js Bumps REST API version used by the web UI.
src/replica/services/ServiceProvider.h Adds chunkMap() accessor and member for the new service.
src/replica/services/ServiceProvider.cc Lazily constructs and returns the ChunkMap service.
src/replica/services/CMakeLists.txt Adds ChunkMap.cc to the replica services build.
src/replica/services/ChunkMap.h New service interface for tracking/updating chunk disposition.
src/replica/services/ChunkMap.cc Implements chunk-map refresh and bulk persistence into QMeta.
src/replica/qserv/PostEventQservCzarMgtRequest.h New request type for posting management events to Czars.
src/replica/qserv/PostEventQservCzarMgtRequest.cc Implements HTTP POST of events to the Czar /event endpoint.
src/replica/qserv/CMakeLists.txt Adds the new request implementation to the build.
src/replica/contr/ReplicationTask.h Removes in-task chunk-map implementation (moved to service).
src/replica/contr/ReplicationTask.cc Switches chunk-map updates to use ServiceProvider::chunkMap().
src/replica/contr/HttpIngestModule.h Declares helper to notify Czars about data-management events.
src/replica/contr/HttpIngestModule.cc Posts events on publish/delete operations and updates chunk map prior to notifications.
src/replica/CMakeLists.txt Links replica library against cconfig for event types.
src/http/MetaModule.cc Bumps HTTP meta-module version to 57.
src/http/ChttpMetaModule.cc Bumps CHTTP meta-module version to 57.
src/czar/HttpSvc.h Plumbs EventService into the Czar HTTP service creation API.
src/czar/HttpSvc.cc Registers new POST /event handler and passes EventService through.
src/czar/HttpManagementModule.h New Czar module for handling posted management events.
src/czar/HttpManagementModule.cc Implements event ingestion endpoint and posts into EventService.
src/czar/Czar.h Adds EventService member to Czar.
src/czar/Czar.cc Starts EventService and subscribes to invalidate CSS cache on relevant events.
src/czar/CMakeLists.txt Adds HttpManagementModule.cc to the Czar build.
src/cconfig/EventService.h New async event bus abstraction for Czar to handle posted events.
src/cconfig/EventService.cc Implements thread pool and dispatch logic for event notifications.
src/cconfig/DataManagementEvent.h New event type and JSON serialization interface.
src/cconfig/DataManagementEvent.cc Implements event type parsing/serialization and validation.
src/cconfig/CzarConfig.h Adds config knob for event service threads.
src/cconfig/CzarConfig.cc Validates replication.num_event_threads is non-zero.
src/cconfig/CMakeLists.txt Adds new cconfig sources and links boost_system.
python/lsst/qserv/admin/replication_interface.py Bumps Python admin replication API version to 57.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/replica/contr/ReplicationTask.cc Outdated
Comment thread src/replica/contr/HttpIngestModule.cc
Comment thread src/cconfig/EventService.cc
Comment thread src/cconfig/EventService.cc
Comment thread src/cconfig/EventService.cc
Comment thread src/cconfig/EventService.h
Comment thread src/cconfig/EventService.h Outdated
Comment thread src/http/MetaModule.cc
Comment thread src/replica/services/ChunkMap.h Outdated

@fritzm fritzm left a comment

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.

LGTM -- thanks!

@jgates108 jgates108 left a comment

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.

LGTM - I focused mostly on the qserv parts.

Comment thread src/cconfig/DataManagementEvent.cc Outdated
Comment thread src/cconfig/EventService.cc Outdated
Comment thread src/cconfig/testEventService.cc Outdated
Unit tests for the new classes.

Subscribe Czar for handling certain data management events which
require clearning the empty chunk lists in the CSS cache.
Pushed the chunk map management from the Replication thread into the
ServiceProvider component. This will allow accessing/updating the map from
various components of the Replication Controller.
@iagaponenko
iagaponenko merged commit b8ed999 into main Jul 17, 2026
7 checks passed
@iagaponenko
iagaponenko deleted the tickets/DM-55404 branch July 17, 2026 04:31
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.

4 participants