Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f7ab71b

Browse files
committed
Fix typo and comments related to the recent no-wait lock improvements
The argument of dontWait at the top of ProcSleep() was documented backwards, and there was a typo in lock.c. Thinkos in 2346df6. Author: Will Mortensen Reviewed-by: Jingxian Li, Michael Paquier Discussion: https://postgr.es/m/CAMpnoC5f+eiS7tdy8PUpd_LacSTVT-pYpVooKfjHRQQmkHPZ2g@mail.gmail.com
1 parent dd087e1 commit f7ab71b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/backend/storage/lmgr/lock.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
10601060

10611061
/*
10621062
* Check the proclock entry status. If dontWait = true, this is an
1063-
* expected case; otherwise, it will open happen if something in the
1063+
* expected case; otherwise, it will only happen if something in the
10641064
* ipc communication doesn't work correctly.
10651065
*/
10661066
if (!(proclock->holdMask & LOCKBIT_ON(lockmode)))

src/backend/storage/lmgr/proc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1054,8 +1054,8 @@ AuxiliaryPidGetProc(int pid)
10541054
* at exit.
10551055
*
10561056
* Result: PROC_WAIT_STATUS_OK if we acquired the lock, PROC_WAIT_STATUS_ERROR
1057-
* if not (if dontWait = true, this is a deadlock; if dontWait = false, we
1058-
* would have had to wait).
1057+
* if not (if dontWait = true, we would have had to wait; if dontWait = false,
1058+
* this is a deadlock).
10591059
*
10601060
* ASSUME: that no one will fiddle with the queue until after
10611061
* we release the partition lock.

0 commit comments

Comments
 (0)