Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

saveLogs method refactor for mtail #124

@dnck

Description

@dnck

Currently, the saveLogs method in utils/HelixIOUtils.java saves the log file under a name with a datetime stamp with precision down to the seconds.

However, in a docker set-up, I am sharing a volume between >1 containers so that the nodes can write their log file to a shared directory on the host.

The problem with this is that if two nodes write the same name for the log file, then there might be a conflict and some type of race-condition might occur.

To fix this, we could use insert a UUID in the log file names.

Additionally, the saveLogs method can be simplified for clarity, using, for example, the String.join method.

If approved, I can submit a simple pull request with a refactor of the saveLogs method that fixes these two issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions