[
https://issues.apache.org/jira/browse/HDDS-5111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jackson Yao updated HDDS-5111:
------------------------------
Description:
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}
was:
when investigating [SCM OOM|https://issues.apache.org/jira/browse/HDDS-5105],
I find that datanode will always report full information about
containers,pipeline and node.
by default , ContainerReportPublisher thread runs periodically (default
interval 60s) in Datanode.
> DataNode 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
>
> 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: [email protected]
For additional commands, e-mail: [email protected]