summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGerhard Lazu <gerhard@lazu.co.uk>2018-02-22 14:25:37 +0000
committerMichael Klishin <michael@clojurewerkz.org>2018-03-28 00:56:34 +0300
commit88945e3814e43431f0dfebb76398412ec484d765 (patch)
treeacf6c3c55b60c32c94eb1e0223bf2eb25aba370e /include
parentf2ab0b40f034cda6bca4294735b493f20550b93c (diff)
downloadrabbitmq-server-git-88945e3814e43431f0dfebb76398412ec484d765.tar.gz
Delete bindings from mnesia without full table scan
mnesia:match_object/3 scans the entire table and can take many seconds on a loaded node. This is especially bad when there are many bindings which need to be deleted. If the object is in the table then delete it, otherwise carry on. Prior to this change, it was observed that there is a high % of lock collisions in rabbit_topic_trie_binding table: ``` lock id #tries #collisions collisions [%] time [us] duration [%] histogram [log2(us)] ----- --- ------- ------------ --------------- ---------- ------------- --------------------- db_tab rabbit_topic_trie_binding 258465 13627 5.2723 1389904 0.0370 | ...XXxxXx.......... | ``` mnesia:match_object/3 uses a table index if it exists, but in the case of rabbit_topic_trie_binding, there is no table index, so a full table scan used to be performed. For more context, see #1513 Partner-in-crime: @essen
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions