Fossil SCM
Do not warn about hung backoffice processes if they have been running for only a little more than 60 seconds.
Commit
7ed4d030cf815a9b83ac1bf0163c2f3e4f8e53e21e5d31539e0fb6c177124bee
Parent
36f72c08727ddb7…
1 file changed
+2
-7
+2
-7
| --- src/backoffice.c | ||
| +++ src/backoffice.c | ||
| @@ -545,19 +545,14 @@ | ||
| 545 | 545 | break; |
| 546 | 546 | } |
| 547 | 547 | }else{ |
| 548 | 548 | if( (sqlite3_uint64)(lastWarning+warningDelay) < tmNow ){ |
| 549 | 549 | sqlite3_int64 runningFor = BKOFCE_LEASE_TIME + tmNow - x.tmCurrent; |
| 550 | - if( warningDelay<=240 && runningFor>1800 ){ | |
| 551 | - /* On a busy system with 15-bit process-id numbers, we can sometimes | |
| 552 | - ** wrap-around the process-id space causing backofficeProcessDone() | |
| 553 | - ** to return a false negative. Try to prevent this from causing a | |
| 554 | - ** false-positive hung-backoffice warning. */ | |
| 555 | - }else{ | |
| 550 | + if( warningDelay>=240 && runningFor<1800 ){ | |
| 556 | 551 | fossil_warning( |
| 557 | 552 | "backoffice process %lld still running after %d seconds", |
| 558 | - x.idCurrent, (int)(BKOFCE_LEASE_TIME + tmNow - x.tmCurrent)); | |
| 553 | + x.idCurrent, runningFor); | |
| 559 | 554 | } |
| 560 | 555 | lastWarning = tmNow; |
| 561 | 556 | warningDelay *= 2; |
| 562 | 557 | } |
| 563 | 558 | if( backofficeSleep(1000) ){ |
| 564 | 559 |
| --- src/backoffice.c | |
| +++ src/backoffice.c | |
| @@ -545,19 +545,14 @@ | |
| 545 | break; |
| 546 | } |
| 547 | }else{ |
| 548 | if( (sqlite3_uint64)(lastWarning+warningDelay) < tmNow ){ |
| 549 | sqlite3_int64 runningFor = BKOFCE_LEASE_TIME + tmNow - x.tmCurrent; |
| 550 | if( warningDelay<=240 && runningFor>1800 ){ |
| 551 | /* On a busy system with 15-bit process-id numbers, we can sometimes |
| 552 | ** wrap-around the process-id space causing backofficeProcessDone() |
| 553 | ** to return a false negative. Try to prevent this from causing a |
| 554 | ** false-positive hung-backoffice warning. */ |
| 555 | }else{ |
| 556 | fossil_warning( |
| 557 | "backoffice process %lld still running after %d seconds", |
| 558 | x.idCurrent, (int)(BKOFCE_LEASE_TIME + tmNow - x.tmCurrent)); |
| 559 | } |
| 560 | lastWarning = tmNow; |
| 561 | warningDelay *= 2; |
| 562 | } |
| 563 | if( backofficeSleep(1000) ){ |
| 564 |
| --- src/backoffice.c | |
| +++ src/backoffice.c | |
| @@ -545,19 +545,14 @@ | |
| 545 | break; |
| 546 | } |
| 547 | }else{ |
| 548 | if( (sqlite3_uint64)(lastWarning+warningDelay) < tmNow ){ |
| 549 | sqlite3_int64 runningFor = BKOFCE_LEASE_TIME + tmNow - x.tmCurrent; |
| 550 | if( warningDelay>=240 && runningFor<1800 ){ |
| 551 | fossil_warning( |
| 552 | "backoffice process %lld still running after %d seconds", |
| 553 | x.idCurrent, runningFor); |
| 554 | } |
| 555 | lastWarning = tmNow; |
| 556 | warningDelay *= 2; |
| 557 | } |
| 558 | if( backofficeSleep(1000) ){ |
| 559 |