summaryrefslogtreecommitdiff
path: root/storage/rocksdb
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-03-13 06:02:08 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-03-13 10:13:14 +0400
commit20928e2e960454ff7f9dee0094a464b1a6fdb195 (patch)
tree05773ee895214cedb742e2631302c29dd772edf5 /storage/rocksdb
parentaa6058469e2fbf9260e9b8b80ab4975ffa4e53ab (diff)
downloadmariadb-git-20928e2e960454ff7f9dee0094a464b1a6fdb195.tar.gz
MDEV-14984 - regression in connect performance
Removed redundant plugin_thdvar_cleanup() from end_connection(): called by THD::free_connection(), which always follows end_connection(). Saves at least one lock(LOCK_plugin) and one rdlock(LOCK_system_variables_hash). Benchmarked on a 2socket/20core/40threads Broadwell system using sysbench connect brencmark @40 threads (with select 1 disabled). 10.2 shows moderate improvement: 136219.93 -> 137766.31 CPS. 10.3 is improvement is somewhat better: 93018.29 -> 101379.77 CPS. Also backported MyRocks memory leak fix from 10.4, which turned out to be unrelated.
Diffstat (limited to 'storage/rocksdb')
-rw-r--r--storage/rocksdb/ha_rocksdb.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index a6689f7707f..768c967ef63 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -14010,6 +14010,8 @@ rocksdb_set_update_cf_options(THD *const /* unused */,
RDB_MUTEX_LOCK_CHECK(rdb_sysvars_mutex);
+ my_free(*reinterpret_cast<void **>(var_ptr));
+
if (!val) {
*reinterpret_cast<char **>(var_ptr) = nullptr;
RDB_MUTEX_UNLOCK_CHECK(rdb_sysvars_mutex);