Will Berkeley has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/7981

Change subject: KUDU-2044 Tombstoned tablets show up in /metrics
......................................................................

KUDU-2044 Tombstoned tablets show up in /metrics

This patch stops tombstoned tablets from showing up in /metrics. It
marks the tablet metric entity as unpublished, which causes all of
its metrics to be retired and causes the metric registry to de-register
it. If a new copy of the tablet is placed on the server, the new
tablet's metric entity will replace the old one, if the old one's
hasn't been deregistered yet (steps toward deregistration occur only
when the entity publishes metrics e.g. on a call to /metrics).

The tombstoned's tablets metric entity is not destroyed when it's
deregistered, since there are still refs to it and its metrics in the
TabletReplica class, Tablet class, and many other classes associated
with a TabletReplica. The entity will be destroyed when the
TabletReplica is deleted (since it either contains or holds final
references to all the other classes), which happens if the tablet is
replaced or deleted. While it's not ideal to hold the memory for the
entity when it's no longer used, the reason this occurs is because the
TabletReplica instance mostly stays alive. Releasing all the metric
references would require specifically dropping refs to those metrics in
all the surviving subcomponents of a TabletReplica instance that has
been shut down; I think this problem would be better solved by more
completely cleaning up a shut down TabletReplica instance, but that's a
much larger scope than suppressing the metrics.

Change-Id: I21b52262203410ded1e514502b59a79be12f8fb3
---
M src/kudu/integration-tests/tablet_copy-itest.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/util/metrics.cc
M src/kudu/util/metrics.h
5 files changed, 145 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/81/7981/1
-- 
To view, visit http://gerrit.cloudera.org:8080/7981
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I21b52262203410ded1e514502b59a79be12f8fb3
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Will Berkeley <[email protected]>

Reply via email to