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.
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.