[MDEV-28775] Implement connection manager in Spider Created: 2022-06-08  Updated: 2023-10-12

Status: Stalled
Project: MariaDB Server
Component/s: Storage Engine - Spider
Fix Version/s: None

Type: Task Priority: Major
Reporter: Nayuta Yanagisawa (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-27902 Spider: Crashes, asserts, hangs, corr... Stalled
relates to MDEV-28352 Spider: heap-use-after-free in ha_spi... Closed
relates to MDEV-28676 Spider: Got error 12701 when reading ... Closed
relates to MDEV-28683 Spider: SIGSEGV in spider_db_direct_d... Closed
relates to MDEV-29962 SIGSEGV in ha_spider::lock_tables on ... Stalled

 Description   

Implement a connection management mechanism to Spider to make the connection handing easy.

  • Each thread gets/returns connections from/to the connection manager. Allocation and deallocation of connections should be done inside the connection manager code.
  • Each connection got from the manager should solely belong to a single thread. Note that, in the current implementation, a single connection is referenced by both ha_spider::conns and SPIDER_TRX::trx_conn_hash and this results in the heap-use-after-free (see linked issues) in many test cases.
  • Spider 10.3-10.9 has two types of connections. One is for SQL and the other is for handler statements. The latter one has been deprecated from 10.7 and deleted by 10.10. So, we only implement the connection manager for SQL connections.
  • For the ease of the development, I recommend creating a patch for 10.10 first and then backporting it to 10.3.

Generated at Thu Feb 08 10:03:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.