Database locking

Records are not locked while they are displayed in a ClearQuest client application. Optimistic locking in ClearQuest enables more than one user to view and attempt to modify a record at the same time but prevents all but the first user from committing their changes. As a consequence, any schema design that uses a single site or a replicated environment should take that into account.

Data integrity is ensured by checking, at the time a user clicks the Apply button, whether another user has updated the record and committed their change while still in the process of making their changes. If so, the user's updates cannot be committed to the database because this might result in losing some of the other user's changes. The user trying to commit their changes after the record has been updated by another user will receive an error message that their changes were not committed to the database.

In complicated scenarios involving coordinated updates to multiple related records, care must be taken to ensure that this behavior does not cause a problem. Since optimistic locking is effective on each record individually, your application must ensure that the records are updated in the right order and handle failures to update a subordinate record if another user updated it between the beginning of your action and committing your changes. Your schema design can retry the operation, or acknowledge the failure and revert the update of the parent record, or it may commit the parent record update even though the update of the subordinate record failed.

Your schema design should handle cases where a record is modifiable,

Feedback