SDP-537

amo (Adam Morriss)
Adam Morriss created this job , modified by C. Thomas Tyler
Open
Only run the 'unlock -x' command if there's not one already running.

If the first is delayed due to prior database locks, or simply taking a long time to complete, a second and subsequent 'unlock -x' commands will simply sit waiting for that prior one to complete, and perhaps there's a small chance they'll start standing on each others' toes.

Relates to cron job 'unlock' commands as noted in
https://swarm.workshop.perforce.com/projects/perforce-software-sdp/files/main/Server/Unix/p4/common/etc/cron.d/template.crontab.combined

# Run p4 unlock -x on edge servers each hour to remove exclusive locks that
# shouldn't be there.
*/60 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} p4 unlock -x > /dev/null 2>&1
*/60 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_edge.sh ${INSTANCE} p4 unlock -x > /dev/null 2>&1
  • Details
  • Comments -
Status
Open
Project
perforce-software-sdp
Severity
B
Reported By
Adam Morriss
Reported Date
Modified By
C. Thomas Tyler
Modified Date
Owned By
amo
Component
core-unix
Type
Feature