Variable-length records use a variable space management index to make available space when a variable record changes size and is moved in the file. Rather than leave deleted space unavailable, the space management index allows future insertions to take advantage of this deleted space along with the best fit.
The delete node queue thread makes empty index nodes available for reuse, avoiding costly file I/O overhead in creating new nodes. When an index node becomes empty, the thread that emptied the node adds an entry to a delete node queue. The delete node thread reads entries from the delete node queue, prunes the empty nodes from the index tree and adds them to a list of nodes that are available for reuse. Since the operations performed to make empty index nodes reusable may require a huge number of disk operations, the delete node queue thread is started only when FairCom DB is idle.
File Access by Delete Node and Space Reclamation Thread
Logic was added in V11 to control file access by the Delete Node and Space Reclamation threads. These changes are available for FairCom DB when atomic operation support is enabled. This feature is intended to avoid a client being unable to open a c-tree file in exclusive mode because an internal thread has the file open.