Skip to content

Add a mutex to sync access to sentryLogHook

Matthew Bradburn requested to merge mbradburn-mutex-sentry-log-hook into main

What does this MR do?

It adds a mutex to protect mr.sentryLogHook, along with a getter and a setter to acquire/release the mutex. SentryLogHook is a struct, so accesses aren't atomic.

Why was this MR needed?

When 'go test -race' is run on the rTestRunCommand_configReloadingRegression, it detects a race condition while accessing sentryLogHook. This will improve the running of the CI pipeline.

What's the best way to test this MR?

The test failure isn't easily reproducible locally, for some unknown reason, so running tests in the CI pipeline is probably the best way to test.

What are the relevant issue numbers?

Merge request reports