1. 30 Sep, 2024 1 commit
    • Sergei Golubchik's avatar
      MDEV-35032 streaming mode for mhnsw search · a39970cf
      Sergei Golubchik authored
      support SQL semantics for SELECT ... WHERE ... ORDER BY ... LIMIT
      
      * switch from returning k nearest neighbors to returning
        as many as needed, in k-neighbor chunks, with increasing distance
      * make search_layer() skips nodes that are closer than a threshold
      * read_next keeps a search context - list of k found nodes,
        threshold, ctx, etc.
      * when the list of found nodes is exhausted, it repeats the search
        starting from last found nodes and a threshold
      * search context kepts ctx->refcount incremented, so ctx won't go away
      * but commit_lock is unlocked between calls, so InnoDB can modify the table
      * use ctx version to detect that, switch to MHNSW_Trx when it happens
      
      bugfix:
      * use the correct lock in ha_external_lock() for the graph table
      * InnoDB didn't reset locks on ha_external_lock(F_UNLCK) and previous
        LOCK_X leaked into the next statement
      a39970cf
  2. 29 Sep, 2024 31 commits
  3. 26 Sep, 2024 8 commits