InnoDB Plugin  1.0
Data Fields
fts_cache_t Struct Reference

#include <fts0types.h>

Collaboration diagram for fts_cache_t:
Collaboration graph

Data Fields

rw_lock_t lock
rw_lock_t init_lock
ib_mutex_t optimize_lock
ib_mutex_t deleted_lock
ib_mutex_t doc_id_lock
ulint total_size
doc_id_t next_doc_id
doc_id_t synced_doc_id
doc_id_t first_doc_id
ulint deleted
ulint added
fts_stopword_t stopword_info

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.

Field Documentation

ulint fts_cache_t::added

Number of doc ids added since last optimized. This variable is covered by the deleted lock

mem_heap_t* fts_cache_t::cache_heap

Cache Heap

ulint fts_cache_t::deleted

Number of doc ids deleted since last optimized. This variable is covered by deleted_lock

ib_vector_t* fts_cache_t::deleted_doc_ids

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

ib_mutex_t fts_cache_t::deleted_lock

Lock covering deleted_doc_ids

ib_mutex_t fts_cache_t::doc_id_lock

Lock covering Doc ID

doc_id_t fts_cache_t::first_doc_id

first doc id since this table was opened

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

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

rw_lock_t fts_cache_t::init_lock

lock used for the cache intialization, it has different SYNC level as above cache 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

doc_id_t fts_cache_t::next_doc_id

Next doc id

ib_mutex_t fts_cache_t::optimize_lock


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

fts_stopword_t fts_cache_t::stopword_info

Cached stopwords for the FTS

fts_sync_t* fts_cache_t::sync

sync structure to sync data to disk

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

doc_id_t fts_cache_t::synced_doc_id

Doc ID sync-ed to CONFIG table

ulint fts_cache_t::total_size

total size consumed by the ilist field of all nodes. SYNC is run whenever this gets too big

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