-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Random thoughts after looking at #4139. And the overhead from synchronizing cpu-caches to atomically increment a counter that very few people uses, and unexpectedly can become negative after some days.
Lets say we have an application that handles 10.000 requests/sec. This application writes a single logevent for each request.
This means the application will write 36..000.000 logevents/hour. And 864.000.000 logevents/day.
Right now the SequenceID is an integer and can hold 2,147,483,647 events, before it becomes negative. So that is 3 days without restarts. Many applications often run 7 days without restarts.
Maybe the SequenceID-property should only increment when calling the propery-getter? (Skip on constructor)
Maybe https://github.com/NLog/NLog/wiki/SequenceId-layout-renderer should be replaced by https://github.com/NLog/NLog/wiki/Counter-layout-renderer ? (Merge into one)