Skip to content

Commit 94ceff8

Browse files
authored
nsfs nsr monitoring - fix last_monitoring when calculating mode (#9003)
Signed-off-by: Amit Prinz Setter <[email protected]>
1 parent de64d59 commit 94ceff8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/server/system_services/pool_server.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1133,10 +1133,12 @@ function calc_namespace_resource_mode(namespace_resource) {
11331133
if (!map_issues_and_monitoring_report.has(namespace_resource_id)) {
11341134
map_issues_and_monitoring_report.set(namespace_resource_id, { last_monitoring: undefined, issues: [] });
11351135
}
1136-
const issues_report = map_issues_and_monitoring_report.get(namespace_resource_id).issues;
1136+
1137+
const nsr_report = map_issues_and_monitoring_report.get(namespace_resource_id);
1138+
const issues_report = nsr_report.issues;
11371139
const errors_count = _.reduce(issues_report, (acc, issue) => {
11381140
// skip if error timestamp is before of the latest monitoring
1139-
if (issue.time < namespace_resource.last_monitoring) {
1141+
if (issue.time < nsr_report.last_monitoring) {
11401142
return acc;
11411143
}
11421144
const err_type = map_err_to_type_count[issue.error_code] || 'io_errors';

0 commit comments

Comments
 (0)