Skip to content

HBASE-28123 TableRequests metrics broken after altering table#7855

Open
liuxiaocs7 wants to merge 1 commit intoapache:masterfrom
liuxiaocs7:HBASE-28123
Open

HBASE-28123 TableRequests metrics broken after altering table#7855
liuxiaocs7 wants to merge 1 commit intoapache:masterfrom
liuxiaocs7:HBASE-28123

Conversation

@liuxiaocs7
Copy link
Contributor

Comment on lines 65 to +76
private class MetricsSourceAdapter implements MetricsSource {
private final MetricRegistry registry;
private final MetricRegistryInfo info;

MetricsSourceAdapter(MetricRegistry registry) {
this.registry = registry;
MetricsSourceAdapter(MetricRegistryInfo info) {
this.info = info;
}

@Override
public void getMetrics(MetricsCollector collector, boolean all) {
metricsAdapter.snapshotAllMetrics(registry, collector);
Optional<MetricRegistry> registryOpt = MetricRegistries.global().get(info);
registryOpt
.ifPresent(metricRegistry -> metricsAdapter.snapshotAllMetrics(metricRegistry, collector));
Copy link
Contributor Author

@liuxiaocs7 liuxiaocs7 Mar 5, 2026

Choose a reason for hiding this comment

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

this is the fix, we should always use the newest metricRegistry here

@liuxiaocs7 liuxiaocs7 closed this Mar 6, 2026
@liuxiaocs7 liuxiaocs7 reopened this Mar 6, 2026
@liuxiaocs7
Copy link
Contributor Author

Hi, @Apache9, what do you think of this change for this bug, more details see HBASE-28123, Thanks!

@liuxiaocs7
Copy link
Contributor Author

Now the CI pass all!

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.

1 participant