Skip to content

Commit

Permalink
Server issue: when a lock is not taken after a lock wait, the wait en…
Browse files Browse the repository at this point in the history
…d is absent
  • Loading branch information
dfeneyrou committed Jul 26, 2021
1 parent 40a7604 commit fad4378
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/common/cmRecording.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1271,13 +1271,14 @@ cmRecording::storeNewEvents(plPriv::EventExt* events, int eventQty)
// This call returns false if the lock event is a duplicated one.
// If a lock wait end shall be inserted before this one, the boolean doInsertLockWaitEnd is set
bool doInsertLockWaitEnd = false;
if(!processLockUseEvent(evtx, doInsertLockWaitEnd)) continue;
bool doProcessLockUse = processLockUseEvent(evtx, doInsertLockWaitEnd);
if(!doProcessLockUse && !doInsertLockWaitEnd) continue;

// In case of lock wait insertion, we turn the lock into a lock wait end now (change in level)
// and indicate that the original bugz shall be logged afterward
if(doInsertLockWaitEnd) {
// Indicate the flags of the second event
secondEventFlags = evtx.flags;
// Indicate the flags of the second event if the lock use shall be processed
if(doProcessLockUse) secondEventFlags = evtx.flags;
// Mutate the current event into a wait end (which modifies the level)
evtx.flags = PL_FLAG_TYPE_LOCK_WAIT | PL_FLAG_SCOPE_END;
}
Expand Down

0 comments on commit fad4378

Please sign in to comment.