Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ public ReplicationManager(final ConfigurationSource conf,
this.ratisReplicationCheckHandler =
new RatisReplicationCheckHandler(ratisContainerPlacement);
this.nodeManager = nodeManager;
this.metrics = ReplicationManagerMetrics.create(this);

ecUnderReplicationHandler = new ECUnderReplicationHandler(
ecContainerPlacement, conf, this);
Expand Down Expand Up @@ -285,7 +286,6 @@ public synchronized void start() {
if (!isRunning()) {
LOG.info("Starting Replication Monitor Thread.");
running = true;
metrics = ReplicationManagerMetrics.create(this);
if (rmConf.isLegacyEnabled()) {
legacyReplicationManager.setMetrics(metrics);
}
Comment on lines -288 to 291
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @aswinshakil for the fix. Please note that ReplicationManager can be stopped/restarted by admin from CLI.
stop() unregisters the metrics source, and start() used to (re)create it. But now it isn't re-created, so it won't work after restart. One way to fix this is to add a method in ReplicationManagerMetrics to register it with the metrics system (without creating a new instance), and call this new method from start().

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing out @adoroszlai . I wasn't aware of that, feel free to assign the JIRA to me if created, or I can create one.

Copy link
Contributor

@adoroszlai adoroszlai Sep 5, 2023

Choose a reason for hiding this comment

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

Thanks @aswinshakil, created HDDS-9235.

Expand Down