Skip to content
Snippets Groups Projects

feat: unprepare statement references after sql execution

Merged Denis Smirnov requested to merge sd/execute into 2.11.2-picodata
  1. Sep 05, 2024
  2. Aug 30, 2024
    • Denis Smirnov's avatar
      feat: unprepare statement references after sql execution · 192bfc43
      Denis Smirnov authored
      Picodata SQL now manages the Tarantool statement cache using a
      dedicated SQL fiber that handles preparation and unpreparation of
      statements based on an LRU eviction policy. Prepared statements
      can be executed across different sessions by SQL clients.
      
      Previously, when a client executed a prepared statement, it
      increased the reference count in the statement cache and linked
      the statement to the client's session. While this approach seemed
      fine, it caused issues during eviction, as references to these
      statements remained in client sessions, preventing proper eviction.
      
      This commit addresses the issue by ensuring that if a statement is
      added to the current session during execution, it is removed and
      the session state is restored once execution is complete.
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      Verified
      192bfc43
Loading