You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixing occasional MyRocks SIGABRT on shutdown (mysql#122)
Summary:
RocksDB has some static object dependencies, and without
following dependencies, it hits SIGABRT. This diff has
two fixes.
1. Updating RocksDB revision. D51789 in RocksDB changes the problematic
mutex from global variable to local (function-level) static variable.
2. Changing MyRocks no to call ddl_manager.persist_stats() by
kill_server_thread (which calls rocksdb_done_func()). By calling
ddl_manager.persist_stats(),
rocksdb::ThreadLocalPtr::StaticMeta::OnThreadExit() (which calls
pthread_mutex_lock on "static port::Mutex mutex") is called at the end
of the thread. On the other hand, there is a race between main thread and
kill_server_thread. main thread calls pthread_mutex_destroy for the
mutex. To guarantee not to call pthread_mutex_lock() after
pthread_mutex_destroy(), it is necessary not to call
ddl_manager.persist_stats() from kill_server_thread. This diff fixes the
issue.
@update-submodule: rocksdb
Test Plan: mtr cardinality --repeat=100
Reviewers: hermanlee4, spetrunia, jkedgar
Reviewed By: jkedgar
Subscribers: yhchiang, webscalesql-eng
Differential Revision: https://reviews.facebook.net/D51933
0 commit comments