• Sachin Agarwal's avatar
    Bug #31576731 INNODB_FT_TOTAL_CACHE_SIZE NOT CAPPED WHEN SET TO 32000000 · 236f825e
    Sachin Agarwal authored
    Problem:
    Server throws OOM error when we execute twitter load with SELECTs
    for UPDATE + UPDATES, and SELECT queries on tables with full-text
    index.
    FTS cache->total_memory store count of total memory allocated to FTS
    cache (for all fulltext indexes on a table).
    For each word in fts cache, we store doc-id & word position in a
    node->ilist.
    we increment cache->total_memory with size of doc-id & word position
    whereas we allocate ilist in chuck of 16, 32 ,64 bytes or 1.2 times
    of last size.
    When we wil insert huge amount of data into the FTS aux index tables
    then collectively these small chucks for each token become huge
    unaccounted memory allocated for FTS cache.
    
    Fix:
    Incremented cache->total_memory by size of chunk allocated to
    node->ilist.
    
    RB: 25286
    Reviewed by : Rahul Agarkar <rahul.agarkar@oracle.com>
    
    mysql/mysql-server@7ab5707f1c4482ed050ed9fa739e9ec0e2fc0ffa
    236f825e
fts0fts.cc 162 KB