]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Increase the WAL-mode SQLITE_PROTOCOL timeout to 10 seconds.
authordrh <drh@noemail.net>
Thu, 12 Jun 2014 17:10:18 +0000 (17:10 +0000)
committerdrh <drh@noemail.net>
Thu, 12 Jun 2014 17:10:18 +0000 (17:10 +0000)
FossilOrigin-Name: 2aeacf81df92b4fe5d1825c1dc1cd176b8af8bd9

manifest
manifest.uuid
src/wal.c

index c5694c123ef5c5897b82d2e963677a32bc82ad57..80147db415062f378669ee127e3345427056491a 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Simplify\sthe\sestLog()\sroutine.
-D 2014-06-12T15:46:46.043
+C Increase\sthe\sWAL-mode\sSQLITE_PROTOCOL\stimeout\sto\s10\sseconds.
+D 2014-06-12T17:10:18.787
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in dd2b1aba364ff9b05de41086f74407f285c57670
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -291,7 +291,7 @@ F src/vdbemem.c 6fc77594c60f6155404f3f8d71bf36d1fdeb4447
 F src/vdbesort.c 44441d73b08b3a638dcdb725afffb87c6574ad27
 F src/vdbetrace.c 6f52bc0c51e144b7efdcfb2a8f771167a8816767
 F src/vtab.c 21b932841e51ebd7d075e2d0ad1415dce8d2d5fd
-F src/wal.c 76e7fc6de229bea8b30bb2539110f03a494dc3a8
+F src/wal.c 264df50a1b33124130b23180ded2e2c5663c652a
 F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
 F src/walker.c 11edb74d587bc87b33ca96a5173e3ec1b8389e45
 F src/where.c 778943263d3d6de375f9e983998d61d61810e9d5
@@ -1174,7 +1174,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 6484fb5a25c2a0e5d26694285a4908a22c67ba17
-R 34527842724eabaf8c54b06a4f0df0d3
+P 6c68d758bce3752f044752404a76bf3ba3eec48f
+R 2f07fa98b6e908bc6502590dbe40f41c
 U drh
-Z d9811e61b520e89dd1ac8e506eeb59a8
+Z 7ca1de307211ad47daac93b8be7d2faa
index e050dd554d08dec54c136ce1729db953c4c582b6..f0d84ac5584820081ae4e9e89e7049559d97c9c2 100644 (file)
@@ -1 +1 @@
-6c68d758bce3752f044752404a76bf3ba3eec48f
\ No newline at end of file
+2aeacf81df92b4fe5d1825c1dc1cd176b8af8bd9
\ No newline at end of file
index ad76065f504c18a7e1f378b2b0fec79ea24db673..70395f8bee4e0e162855323f49e659b62faa1ed1 100644 (file)
--- a/src/wal.c
+++ b/src/wal.c
@@ -2096,8 +2096,8 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){
   ** calls to sqlite3OsSleep() have a delay of 1 microsecond.  Really this
   ** is more of a scheduler yield than an actual delay.  But on the 10th
   ** an subsequent retries, the delays start becoming longer and longer, 
-  ** so that on the 100th (and last) RETRY we delay for 21 milliseconds.
-  ** The total delay time before giving up is less than 1 second.
+  ** so that on the 100th (and last) RETRY we delay for 323 milliseconds.
+  ** The total delay time before giving up is less than 10 seconds.
   */
   if( cnt>5 ){
     int nDelay = 1;                      /* Pause time in microseconds */
@@ -2105,7 +2105,7 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){
       VVA_ONLY( pWal->lockError = 1; )
       return SQLITE_PROTOCOL;
     }
-    if( cnt>=10 ) nDelay = (cnt-9)*238;  /* Max delay 21ms. Total delay 996ms */
+    if( cnt>=10 ) nDelay = (cnt-9)*(cnt-9)*39;
     sqlite3OsSleep(pWal->pVfs, nDelay);
   }