Skip to content
This repository was archived by the owner on Sep 20, 2022. It is now read-only.
This repository was archived by the owner on Sep 20, 2022. It is now read-only.

Race-condition triggered when reading events takes too long #13

@raltnoeder

Description

@raltnoeder

Problem description
When reading events from drbdsetup takes too long, e.g. when there are lots of resources and therefore lots of event lines to parse, then the ResourceCollection.prune() method in pkg/update/update.go will remove resources that have just been added in the same events collection cycle, because the time stamp is already too old.
The result is that resources are either never displayed, or, depending on the exact timing, the display may flap from showing the resources to not showing them, or possibly showing only some resources.

Steps to reproduce
Run with lots of resources configured (seen with 2000 resources on our pina/colada test systems). The problem does not seem to affect resources that are not started - those are always listed.

Possible solution
It may make sense to do a single prune() run before starting a new events poll cycle, so that no matter how long each cycle takes, it would always show at least the resources that were seen in the last cycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions