Summary:
Pull Request resolved: https://github.com/facebook/rocksdb/pull/12128
The patch turns the `Timer` Meyers singleton in `PeriodicTaskScheduler::Default()` into one of the leaky variety in order to prevent static destruction order issues.
Reviewed By: akankshamahajan15
Differential Revision:
D51963950
fbshipit-source-id:
0fc34113ad03c51fdc83bdb8c2cfb6c9f6913948
}
Timer* PeriodicTaskScheduler::Default() {
- static Timer timer(SystemClock::Default().get());
+ STATIC_AVOID_DESTRUCTION(Timer, timer)(SystemClock::Default().get());
return &timer;
}
#endif // NDEBUG
} // namespace ROCKSDB_NAMESPACE
-
--- /dev/null
+Avoid destroying the periodic task scheduler's default timer in order to prevent static destruction order issues.