Skip to content

Change "dropped events" warning to debug-level log message#11

Merged
stevvooe merged 1 commit intodocker:masterfrom
aaronlehmann:dropped-events
Jun 1, 2016
Merged

Change "dropped events" warning to debug-level log message#11
stevvooe merged 1 commit intodocker:masterfrom
aaronlehmann:dropped-events

Conversation

@aaronlehmann
Copy link
Copy Markdown
Collaborator

In a project where I use go-events, quite a few unit tests and
benchmarks read from a queue until they find what they're looking for,
and then stop reading. There may be more events published to the queue
afterwards, but there's no non-racy way to consume all of them and still
have the test terminate. Thus, these tests and benchmarks tend to log
many WARN[0004] eventqueue: dropped event messages.

Change this to the debug log level, so applications and unit tests which
use go-events are not forced to always consume all events to suppress
these messages.

@stevvooe
Copy link
Copy Markdown
Contributor

stevvooe commented Jun 1, 2016

There may be more events published to the queue
afterwards, but there's no non-racy way to consume all of them and still
have the test terminate

I'd like to address this issue. The goal of go-events is to be able to reliably produce and consume events without losing them. A dropped event can be really problematic in practice.

I suspect the current consumer shutdown procedure is at fault here. This close should be propagated at queue ingress, rather than just drop in flight messages on close.

In a project where I use go-events, quite a few unit tests and
benchmarks read from a queue until they find what they're looking for,
and then stop reading. There may be more events published to the queue
afterwards, but there's no non-racy way to consume all of them and still
have the test terminate. Thus, these tests and benchmarks tend to log
many `WARN[0004] eventqueue: dropped event` messages.

Change this to the debug log level, so applications and unit tests which
use go-events are not forced to always consume all events to suppress
these messages.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
@aaronlehmann
Copy link
Copy Markdown
Collaborator Author

Added a big TODO.

@stevvooe
Copy link
Copy Markdown
Contributor

stevvooe commented Jun 1, 2016

LGTM

@stevvooe stevvooe merged commit 75bd8e1 into docker:master Jun 1, 2016
@aaronlehmann aaronlehmann deleted the dropped-events branch July 18, 2016 17:37
aaronlehmann pushed a commit to aaronlehmann/docker that referenced this pull request Jul 18, 2016
This is needed to suppress a log message about a harmless condition
which was previously logged at the WARNING log level with potentially
high frequency (docker/go-events#11).

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
tiborvass pushed a commit to tiborvass/docker that referenced this pull request Jul 26, 2016
This is needed to suppress a log message about a harmless condition
which was previously logged at the WARNING log level with potentially
high frequency (docker/go-events#11).

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit db9bc51)
Signed-off-by: Tibor Vass <tibor@docker.com>
rchicoli pushed a commit to rchicoli/docker that referenced this pull request Nov 12, 2016
This is needed to suppress a log message about a harmless condition
which was previously logged at the WARNING log level with potentially
high frequency (docker/go-events#11).

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit db9bc51)
Signed-off-by: Tibor Vass <tibor@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants