Fossil SCM
Try to start a new write transaction before updating the VCACHE table. This will hopefully prevent occasional "database is locked" errors when browsing the documentation.
Commit
03979823d152afbd0ddd057d050aa5e0a5f5c20e04245b8746588dc26c35e874
Parent
34a3bc12b0a699d…
1 file changed
+4
+4
| --- src/doc.c | ||
| +++ src/doc.c | ||
| @@ -467,10 +467,14 @@ | ||
| 467 | 467 | ** if the file is not found or could not be loaded. |
| 468 | 468 | */ |
| 469 | 469 | int doc_load_content(int vid, const char *zName, Blob *pContent){ |
| 470 | 470 | int writable = db_is_writeable("repository"); |
| 471 | 471 | int rid; /* The RID of the file being loaded */ |
| 472 | + if( writable ){ | |
| 473 | + db_end_transaction(0); | |
| 474 | + db_begin_write(); | |
| 475 | + } | |
| 472 | 476 | if( !db_table_exists("repository", "vcache") || !writable ){ |
| 473 | 477 | db_multi_exec( |
| 474 | 478 | "CREATE %s TABLE IF NOT EXISTS vcache(\n" |
| 475 | 479 | " vid INTEGER, -- check-in ID\n" |
| 476 | 480 | " fname TEXT, -- filename\n" |
| 477 | 481 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -467,10 +467,14 @@ | |
| 467 | ** if the file is not found or could not be loaded. |
| 468 | */ |
| 469 | int doc_load_content(int vid, const char *zName, Blob *pContent){ |
| 470 | int writable = db_is_writeable("repository"); |
| 471 | int rid; /* The RID of the file being loaded */ |
| 472 | if( !db_table_exists("repository", "vcache") || !writable ){ |
| 473 | db_multi_exec( |
| 474 | "CREATE %s TABLE IF NOT EXISTS vcache(\n" |
| 475 | " vid INTEGER, -- check-in ID\n" |
| 476 | " fname TEXT, -- filename\n" |
| 477 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -467,10 +467,14 @@ | |
| 467 | ** if the file is not found or could not be loaded. |
| 468 | */ |
| 469 | int doc_load_content(int vid, const char *zName, Blob *pContent){ |
| 470 | int writable = db_is_writeable("repository"); |
| 471 | int rid; /* The RID of the file being loaded */ |
| 472 | if( writable ){ |
| 473 | db_end_transaction(0); |
| 474 | db_begin_write(); |
| 475 | } |
| 476 | if( !db_table_exists("repository", "vcache") || !writable ){ |
| 477 | db_multi_exec( |
| 478 | "CREATE %s TABLE IF NOT EXISTS vcache(\n" |
| 479 | " vid INTEGER, -- check-in ID\n" |
| 480 | " fname TEXT, -- filename\n" |
| 481 |