mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
049d839350
* preserve the graph in memory between statements * keep it in a TABLE_SHARE, available for concurrent searches * nodes are generally read-only, walking the graph doesn't change them * distance to target is cached, calculated only once * SIMD-optimized bloom filter detects visited nodes * nodes are stored in an array, not List, to better utilize bloom filter * auto-adjusting heuristic to estimate the number of visited nodes (to configure the bloom filter) * many threads can concurrently walk the graph. MEM_ROOT and Hash_set are protected with a mutex, but walking doesn't need them * up to 8 threads can concurrently load nodes into the cache, nodes are partitioned into 8 mutexes (8 is chosen arbitrarily, might need tuning) * concurrent editing is not supported though * this is fine for MyISAM, TL_WRITE protects the TABLE_SHARE and the graph (note that TL_WRITE_CONCURRENT_INSERT is not allowed, because an INSERT into the main table means multiple UPDATEs in the graph) * InnoDB uses secondary transaction-level caches linked in a list in in thd->ha_data via a fake handlerton * on rollback the secondary cache is discarded, on commit nodes from the secondary cache are invalidated in the shared cache while it is exclusively locked * on savepoint rollback both caches are flushed. this can be improved in the future with a row visibility callback * graph size is controlled by @@mhnsw_cache_size, the cache is flushed when it reaches the threshold |
||
---|---|---|
.. | ||
archive | ||
atomic | ||
binlog | ||
binlog_encryption | ||
client | ||
compat | ||
csv | ||
encryption | ||
engines | ||
events | ||
federated | ||
funcs_1 | ||
funcs_2 | ||
galera | ||
galera_3nodes | ||
galera_3nodes_sr | ||
galera_sr | ||
gcol | ||
handler | ||
heap | ||
innodb | ||
innodb_fts | ||
innodb_gis | ||
innodb_i_s | ||
innodb_zip | ||
jp | ||
json | ||
large_tests | ||
maria | ||
mariabackup | ||
merge | ||
mtr/t | ||
mtr2 | ||
multi_source | ||
optimizer_unfixed_bugs | ||
parts | ||
perfschema | ||
perfschema_stress | ||
period | ||
plugins | ||
roles | ||
rpl | ||
s3 | ||
sql_sequence | ||
storage_engine | ||
stress | ||
sys_vars | ||
sysschema | ||
unit | ||
vcol | ||
versioning | ||
wsrep |