-
Notifications
You must be signed in to change notification settings - Fork 24
Description
AvalancheGo has this flag. Firewood should provide this flag as well. This can be done either when opening the database or configuration metrics. If done when configuring metrics, this can be done by setting global static atomic bool that is read with relaxed ordering when determining whether or not to calculate the metrics. If done when opening the database, this can be added as an open option but will need to be threaded through the codebase everywhere the option is needed.
The former option is easier but the later option is preferred long-term but is more invasive.
I am also open to a convoluted third option where we use Thread-Local Storage (TLS) to set a context variable when entering database methods and then check that TLS for the context variable when needed which prevents tainting global state.