You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Siyao Meng (Jira)" <ji...@apache.org> on 2021/06/07 18:06:00 UTC
[jira] [Resolved] (HDDS-5111) DataNode should not always report
full information in heartbeat
[ https://issues.apache.org/jira/browse/HDDS-5111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Siyao Meng resolved HDDS-5111.
------------------------------
Fix Version/s: 1.2.0
Resolution: Fixed
> DataNode should not always report full information in heartbeat
> ---------------------------------------------------------------
>
> Key: HDDS-5111
> URL: https://issues.apache.org/jira/browse/HDDS-5111
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Jackson Yao
> Assignee: Jackson Yao
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.2.0
>
>
> when investigating SCM OOM, I find that datanode will always report full information about containers,pipeline and node.
> By default , ContainerReportPublisher thread runs periodically (HDDS_CONTAINER_REPORT_INTERVAL, default 60s) in Datanode , and The HeartbeatEndpointTask ,which runs periodically (hdds.heartbeat.interval)should only report information in incrementalReportQueue
> I think the code below has a problem that getReports will always get full information ,because containerReports always holds full information.
> {code:java}
> // code placeholder
> List<GeneratedMessage> getNonIncrementalReports() {
> List<GeneratedMessage> nonIncrementalReports = new LinkedList<>();
> GeneratedMessage report = containerReports.get();
> if (report != null) {
> nonIncrementalReports.add(report);
> }
> report = nodeReport.get();
> if (report != null) {
> nonIncrementalReports.add(report);
> }
> report = pipelineReports.get();
> if (report != null) {
> nonIncrementalReports.add(report);
> }
> return nonIncrementalReports;
> }
> /**
> * Returns available reports from the report queue with a max limit on
> * list size, or empty list if the queue is empty.
> *
> * @return List of reports
> */
> public List<GeneratedMessage> getReports(InetSocketAddress endpoint,
> int maxLimit) {
> if (maxLimit < 0) {
> throw new IllegalArgumentException("Illegal maxLimit value: " + maxLimit);
> }
> List<GeneratedMessage> reports = getNonIncrementalReports();
> if (maxLimit <= reports.size()) {
> return reports.subList(0, maxLimit);
> } else {
> reports.addAll(getIncrementalReports(endpoint,
> maxLimit - reports.size()));
> return reports;
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org