MySQL 8.0.39
Source Code Documentation
fts_cache_t Struct Reference

The cache for the FTS system. More...

#include <fts0types.h>

Public Attributes

rw_lock_t lock
 lock protecting all access to the memory buffer. More...
 
rw_lock_t init_lock
 lock used for the cache initialization, it has different SYNC level as above cache lock More...
 
ib_mutex_t optimize_lock
 Lock for OPTIMIZE. More...
 
ib_mutex_t deleted_lock
 Lock covering deleted_doc_ids. More...
 
ib_mutex_t doc_id_lock
 Lock covering Doc ID. More...
 
ib_vector_tdeleted_doc_ids
 Array of deleted doc ids, each element is of type fts_update_t. More...
 
ib_vector_tindexes
 We store the stats and inverted index for the individual FTS indexes in this vector. More...
 
ib_vector_tget_docs
 information required to read the document from the table. More...
 
ulint total_size
 total size consumed by the ilist field of all nodes. More...
 
uint64_t total_size_before_sync
 total size of fts cache, when last SYNC request was sent More...
 
fts_sync_tsync
 sync structure to sync data to disk More...
 
ib_alloc_tsync_heap
 The heap allocator, for indexes and deleted_doc_ids, ie. More...
 
ib_alloc_tself_heap
 This heap is the heap out of which an instance of the cache itself was created. More...
 
doc_id_t next_doc_id
 Next doc id. More...
 
doc_id_t synced_doc_id
 Doc ID sync-ed to CONFIG table. More...
 
doc_id_t first_doc_id
 first doc id since this table was opened More...
 
ulint deleted
 Number of doc ids deleted since last optimized. More...
 
ulint added
 Number of doc ids added since last optimized. More...
 
fts_stopword_t stopword_info
 Cached stopwords for the FTS. More...
 
mem_heap_tcache_heap
 Cache Heap. More...
 

Detailed Description

The cache for the FTS system.

It is a memory-based inverted index that new entries are added to, until it grows over the configured maximum size, at which time its contents are written to the INDEX table.

Member Data Documentation

◆ added

ulint fts_cache_t::added

Number of doc ids added since last optimized.

This variable is covered by the deleted lock

◆ cache_heap

mem_heap_t* fts_cache_t::cache_heap

Cache Heap.

◆ deleted

ulint fts_cache_t::deleted

Number of doc ids deleted since last optimized.

This variable is covered by deleted_lock

◆ deleted_doc_ids

ib_vector_t* fts_cache_t::deleted_doc_ids

Array of deleted doc ids, each element is of type fts_update_t.

◆ deleted_lock

ib_mutex_t fts_cache_t::deleted_lock

Lock covering deleted_doc_ids.

◆ doc_id_lock

ib_mutex_t fts_cache_t::doc_id_lock

Lock covering Doc ID.

◆ first_doc_id

doc_id_t fts_cache_t::first_doc_id

first doc id since this table was opened

◆ get_docs

ib_vector_t* fts_cache_t::get_docs

information required to read the document from the table.

Each element is of type fts_doc_t

◆ indexes

ib_vector_t* fts_cache_t::indexes

We store the stats and inverted index for the individual FTS indexes in this vector.

Each element is an instance of fts_index_cache_t

◆ init_lock

rw_lock_t fts_cache_t::init_lock

lock used for the cache initialization, it has different SYNC level as above cache lock

◆ lock

rw_lock_t fts_cache_t::lock

lock protecting all access to the memory buffer.

FIXME: this needs to be our new upgrade-capable rw-lock

◆ next_doc_id

doc_id_t fts_cache_t::next_doc_id

Next doc id.

◆ optimize_lock

ib_mutex_t fts_cache_t::optimize_lock

Lock for OPTIMIZE.

◆ self_heap

ib_alloc_t* fts_cache_t::self_heap

This heap is the heap out of which an instance of the cache itself was created.

Objects created using this heap will last for the lifetime of the cache

◆ stopword_info

fts_stopword_t fts_cache_t::stopword_info

Cached stopwords for the FTS.

◆ sync

fts_sync_t* fts_cache_t::sync

sync structure to sync data to disk

◆ sync_heap

ib_alloc_t* fts_cache_t::sync_heap

The heap allocator, for indexes and deleted_doc_ids, ie.

transient objects, they are recreated after a SYNC is completed

◆ synced_doc_id

doc_id_t fts_cache_t::synced_doc_id

Doc ID sync-ed to CONFIG table.

◆ total_size

ulint fts_cache_t::total_size

total size consumed by the ilist field of all nodes.

SYNC is run whenever this gets too big

◆ total_size_before_sync

uint64_t fts_cache_t::total_size_before_sync

total size of fts cache, when last SYNC request was sent


The documentation for this struct was generated from the following file: