/ Check-in [b10ec14e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix for builds without SQLITE_ENABLE_BATCH_ATOMIC_WRITE.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | exp-retry-atomic-commit
Files: files | file ages | folders
SHA3-256: b10ec14ef7edcc5d7b0ad298c8230d1eca5508e8cf673fbbc97a0928b76c92fb
User & Date: dan 2018-07-17 13:55:08
Context
2018-07-17
14:01
If an SQLITE_IOERR error is encountered as part of an atomic commit on an F2FS file-system, retry the commit in legacy journal mode. check-in: 2e0357c2 user: dan tags: trunk
13:55
Fix for builds without SQLITE_ENABLE_BATCH_ATOMIC_WRITE. Closed-Leaf check-in: b10ec14e user: dan tags: exp-retry-atomic-commit
2018-07-16
20:44
Add new file doc/F2FS.txt, containing notes on the way SQLite uses the F2FS atomic commit feature. check-in: 59efb1bf user: dan tags: exp-retry-atomic-commit
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

  6495   6495         ** not the case. In this case it is likely enough that the redundant
  6496   6496         ** xSync() call will be changed to a no-op by the OS anyhow. 
  6497   6497         */
  6498   6498         rc = syncJournal(pPager, 0);
  6499   6499         if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
  6500   6500   
  6501   6501         pList = sqlite3PcacheDirtyList(pPager->pPCache);
         6502  +#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE
  6502   6503         if( bBatch ){
  6503   6504           rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_BEGIN_ATOMIC_WRITE, 0);
  6504   6505           if( rc==SQLITE_OK ){
  6505   6506             rc = pager_write_pagelist(pPager, pList);
  6506   6507             if( rc==SQLITE_OK ){
  6507   6508               rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_COMMIT_ATOMIC_WRITE, 0);
  6508   6509             }
................................................................................
  6517   6518               sqlite3OsClose(pPager->jfd);
  6518   6519             }
  6519   6520             bBatch = 0;
  6520   6521           }else{
  6521   6522             sqlite3OsClose(pPager->jfd);
  6522   6523           }
  6523   6524         }
         6525  +#endif /* SQLITE_ENABLE_BATCH_ATOMIC_WRITE */
  6524   6526   
  6525   6527         if( bBatch==0 && rc==SQLITE_OK ){
  6526   6528           rc = pager_write_pagelist(pPager, pList);
  6527   6529         }
  6528   6530   
  6529   6531         if( rc!=SQLITE_OK ){
  6530   6532           assert( rc!=SQLITE_IOERR_BLOCKED );