[MDEV-5471] Miscellaneous table cache improvements Created: 2013-12-19  Updated: 2021-03-08

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Sergey Vojtovich Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   
  • Add status variable for expensive table cache evictions (from tc_add_table()). Not valid after MDEV-10296
  • Add status variable for cheap table cache evictions (from tc_release_table()). Not valid after MDEV-10296
  • Expensive eviction: evict 10 (or 20, or 100, or 10%) tables at once. Not valid after MDEV-10296
  • Use recently implemented Atomic class for all atomic variables. (Atomic class was declined)
  • Make sure LOCK_open is on a separate cache line (at least until it is used by tc_release_table()). It was seen to cause false sharing with tc_count at least. No LOCK_open anymore, table cache instances are on separate cache lines after MDEV-10296
  • Add an inline getter method TABLE::in_use() that in debug builds will assert: DBUG_ASSERT(table->in_use == current_thd || (table->s->flushed && table->in_use))
  • ha_table_exists() - instead of calling tdc_lock_share()/tdc_unlock_share() do hash lookup.

Generated at Thu Feb 08 07:04:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.