Product Documentation

c-treeACE V10.0 Release Notes

Previous Topic

Next Topic

Correct Free of All Locks with Persistent Transaction Locks Mode

If a client calls ctLOKDYN(ctLOKDYNtranPersist) to enable persistent transaction locks and a variable-length record is updated and grows in place, when the file is closed the c-tree Server logged the message "Unclaimed locks found" to CTSTATUS.FCS.

The RewriteVRecord() logic locks the starting offset of the space into which the record is growing, updates the record header to indicate the new record length, and deletes the key from the space management index that points to this space that has been reused. After these operations are completed, reused space is normally unlocked. However, when using the persistent transaction lock feature, this unlock takes no action as a connection-specific state variable was set to indicate that transaction locks are to be persisted. As a result, that space remains locked until the file is closed, at which time the c-tree Server finds the lock in the system lock table for that data file and logs the "Unclaimed locks found" message to CTSTATUS.FCS.

This lock on the reused space is an internal lock that should always be freed when the update to the record header and space management index have been completed. RewriteVRecord() was modified to correctly handle the persistent locks mode in the state variable by clearing the state bit upon entry into the function and re-enabling the state on exit.

TOCIndex