mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-26 00:00:54 +08:00
If telemetry is disabled, it is checked inside the `ts_telemetry_main` function, which starts to execute after a background worker has been scheduled to execute the function. This means that any errors occurring when starting the job will trigger errors and generate lines in the log. This commit moves the check to before a background worker is scheduled for executing the job and allow the telemetry job to trivially succeed without actually invoking the worker, hence no errors will be generated for the telemetry job if it is disabled. Also, the privacy test result changes and it is updated to check that the telemetry job cannot leak information regardless of whether telemetry is on or off. Fixes #1934 #1788