-
Sanjana DS authored
A new OutputStream type- BufferedOutputStream is added in this patch. All log messages going to this stream are appended to a log buffer. Messages from this log buffer are read by a log thread which appends messages to the data node log file. The log buffer is of type LogBuffer- a class introduced in this patch. LogBuffer handles the producer consumer problem. Appending logs to the log buffer is always non-blocking. Hence, the problems arising due to synchronous prints are avoided The data node's worker process's log messages are made to go into the BufferedOutputStream. This makes logging through ndbout << , ndbout_c, g_eventLogger in the worker non-blocking. Logging using [f]printf, [f]write are blocking/synchronous and must be avoided. CPU locking of the log thread is akin to the other IO threads(Ndbfs).
Sanjana DS authoredA new OutputStream type- BufferedOutputStream is added in this patch. All log messages going to this stream are appended to a log buffer. Messages from this log buffer are read by a log thread which appends messages to the data node log file. The log buffer is of type LogBuffer- a class introduced in this patch. LogBuffer handles the producer consumer problem. Appending logs to the log buffer is always non-blocking. Hence, the problems arising due to synchronous prints are avoided The data node's worker process's log messages are made to go into the BufferedOutputStream. This makes logging through ndbout << , ndbout_c, g_eventLogger in the worker non-blocking. Logging using [f]printf, [f]write are blocking/synchronous and must be avoided. CPU locking of the log thread is akin to the other IO threads(Ndbfs).
Loading