Skip to content

ConsoleLogger Queue optimization can lead to missed log entries #79812

@JanKrivanek

Description

@JanKrivanek

Description

CompleteAdding and TryDequeue try to compete for same lock. Once CompleteAdding wins, no more entries are being logged despite there might still be some in the queue.

More details: #70186 (comment)

Reproduction Steps

Just manual code analysis for now (after one of our integration test broke with runtime upgrade).
We can work on repro if needed.

FYI @vlada-shubina - as she started to dig into our broken test and pointed the focus to the recent console logger queue behavior change

Expected behavior

All logged items, that are logged prior calling Dispose are being flushed after calling Dispose. No items are skipped.

Actual behavior

Some already logged items can be skipped (and not flushed) after calling Dispose

Regression?

Yes

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions