diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wal.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -2994,11 +2994,12 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){ if( cnt>=10 ) nDelay = (cnt-9)*(cnt-9)*39; #ifdef SQLITE_ENABLE_SETLK_TIMEOUT /* In SQLITE_ENABLE_SETLK_TIMEOUT builds, configure the file-descriptor - ** to block for locks for approximately nDelay us. This affects two - ** locks (a) the WRITER lock taken in walIndexReadHdr() if the first - ** attempted read fails and (b) the shared lock taken on the DMS slot - ** in os_unix.c. Both of these locks are attempted from within the - ** call to walIndexReadHdr() below. */ + ** to block for locks for approximately nDelay us. This affects three + ** locks: (a) the shared lock taken on the DMS slot in os_unix.c (if + ** using os_unix.c), (b) the WRITER lock taken in walIndexReadHdr() if the + ** first attempted read fails, and (c) the shared lock taken on the DMS + ** slot in os_unix.c. All three of these locks are attempted from within + ** the call to walIndexReadHdr() below. */ nBlockTmout = (nDelay+998) / 1000; if( !useWal && walEnableBlockingMs(pWal, nBlockTmout) ){ nDelay = 1; |