Description:
The internal of ndb_#_error.log files is confusing, it makes it unnecessarily hard to spot the most recent incident.
And any disk space saving considerations that may have lead to this strange approach in the past should no longer apply; especially when seeing the size that ndb_#_out.log files can grow to at the same time.
How to repeat:
See description
Suggested fix:
Just write ndb_#_error.log files in a linear fashion and let external tools take care of rotation in the usual "external tool renames file, exernal tool sends signal to process, processes closes log file handle, reopens file by the original name, so actually writing to a new file now"
And let handling of trace logs become a responsible of an external tool, too ...
PS: I'm not sure whether there are tools that deeply rely on the old format, if there are then maybe have two different node error log files for a while, the old one keeping the rotation scheme for now while the new one becomes linear and so can be monitored with simple tools like "tail"