Skip to content
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

materialize: don't use locks in the extended logger #2043

Merged
merged 1 commit into from
Oct 11, 2024

Commits on Oct 11, 2024

  1. materialize: don't use locks in the extended logger

    The use of a mutex in both the extended logger event handler and the async
    logger functions was simple, but there was a potential deadlock if the event
    handler needed to stop the logger and wait for it to stop while holding the
    lock, and the logger timer ticked over at nearly the same instant making the
    logger need to get the lock also to finish its last log before exiting.
    
    This updates the extended logger to not use locks at all, since it wasn't far
    from being able to do that in the first place. The "count" values that are read
    concurrently by the async loggers have been changed to use atomics, and for good
    measure the "round" counter is provided as an explicit argument to them, even
    though it doesn't strictly need to be, it's just easier to understand this way.
    williamhbaker committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    611dc61 View commit details
    Browse the repository at this point in the history