-
Notifications
You must be signed in to change notification settings - Fork 301
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ringbuffer of dlt-daemon only record the old log messsages #533
Comments
Logic is in dlt_daemon_client.c:
|
Hello @cumtsmart , I would like to briefly go through some explanation about DLT daemon ring buffer and code logic in dlt-daemon-client-send:
I agree that the log message here is not clear, maybe "Discard old messages" would be better. In dlt.conf set:
Wait for a couple of minutes and receive logs, dlt is writing new logs over old logs in its ring buffer:
Regards |
@minminlittleshrimp |
Hello @cumtsmart We need to differentiate between dlt ring buffer and libdlt buffer.
This in fact a WARNING message, not an INFO like dlt-daemon.
The discarded messages here are New messages coming when libdlt buffer is full. Thank you |
I mean the ringbuffer on dlt-daemon size, not libdlt buffer. And my dlt-daemon is also started up. My attention is focused on dlt_daemon_client.c::dlt_daemon_client_send. In this function, will invoke
dlt_buffer_push3 method store dlt message in dlt-daemon's proccess ringbuffer. when a dlt-client connected, dlt message in dlt-daemon's proccess ringbuffer will sync to dlt-client. Is my understanding correct? |
Hello @cumtsmart
I could say whenever this control response log appears to indicate the overflow: message_buffer_overflow, no new logs are buffered. Let me take a deeper understanding of this behavior. Regards |
Hello @cumtsmart Case: No dlt client available dlt-daemon/src/shared/dlt_common.c Line 2627 in 4ed1b97
dlt-daemon/src/shared/dlt_common.c Line 2634 in 4ed1b97
,in which it means the lost of recent logs. No overwriting process there but only a checking for full buffer during while loop of writing: dlt-daemon/src/shared/dlt_common.c Line 2607 in 4ed1b97
Hence, the mechanism of dlt ring buffers:
In a nutshell, we need to correct the document instead 😀 Hello @michael-methner , please kindly check my points. |
In fact, we do not need to correct the doc: ,,If the named pipe/socket of the DLT daemon is full, an overflow flag is set and the message stored in a ring buffer. The next time, a message could be sent to the DLT daemon, an overflow message is sent first, then the contents of the ring buffer. If sending of this message was possible, the overflow flag is reset.'' No overwriting behavior mention, only store old messages and turn on the full flag. |
@minminlittleshrimp |
not a bug |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
In my opinion, the ringbuffer of dlt-daemon will record the latest dlt log if no dlt-client connect. when the buffer is full, the new coming log will squeeze out the oldest one, this's what ringbuffer means. But i found ringbuffer just drop the new coming dlt log when buffer is full.
The text was updated successfully, but these errors were encountered: