Graylog2 / Graylog2/graylog2-server

Shouldn't only leader node remove outdated docs from nodes collection?

Open
#18,078 3 comments 0 reactions 0 assignees View on GitHub
bug Medium Prio triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## Expected Behavior
Only leader node remove outdated docs from nodes collection.

## Current Behavior
All nodes do it in AbstractNodeService#ping() method every second.
It means that in 16-nodes-big cluster each second Mongo is asked 16 times to remove stale node information.
It seems to be unnecessary.
It may potentially create funny issues when client has `stale_leader_timeout` set to different values in different nodes.

## Possible Solution
Only leader calls dropOutdated() method.

## Context
May be loosely related to HS-2290103299.

## Your Environment
* Graylog Version: 5.2.3
* MongoDB Version: 5

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.