• Thirunarayanan Balathandayuthapani's avatar
    MDEV-25581 Allow user thread to do InnoDB fts cache sync · 1fd7d3a9
    Thirunarayanan Balathandayuthapani authored
    Problem:
    ========
      InnoDB FTS requesting the fts sync of the table once the fts
    cache size reaches 1/10 of innodb_ft_cache_size. But fts_sync()
    releases cache lock when writing the word. By doing this, InnoDB
    insert thread increases the innodb fts cache memory and
    SYNC operation will take more time to complete.
    
    Solution:
    =========
      Remove the fts sync operation(FTS_MSG_SYNC_TABLE) from
    the fts optimize background thread. Instead of that,
    allow user thread to sync the InnoDB fts cache when
    the cache size exceeds 512 kb. User thread holds
    cache lock while doing cache syncing, it make sure that
    other threads doesn't add the docs into the cache.
    
    Removed FTS_MSG_SYNC_TABLE and its related function
    because we do remove the FTS_MSG_SYNC_TABLE message
    itself.
    
    Removed fts_sync_index_check() and all related
    function because other threads doesn't add while
    cache operation going on.
    1fd7d3a9
sync.test 4.83 KB