Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-23 Thread Thanumalayan Sankaranarayana Pillai
Hi Marc, Thanks for your comments! I just got confused that some SQLite webpages ( http://www.sqlite.org/transactional.html, http://www.sqlite.org/features.html) mention that transactions are durable after a power loss (the D in ACID); nowhere has it been mentioned that "immediate durability

Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-23 Thread Marc L. Allen
Just to throw in my $0.02 as a user Given the SQL stream of... COMMIT Vs. Except in cases where, in the first example, I have time to inform someone about the COMMIT before the power loss, there's no functional difference between the two events. I would hate to think I would ever

Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-23 Thread thanumalayan mad
I do not observe any loss in durability in WAL mode: it works totally fine. As for the documentation, http://www.sqlite.org/transactional.html and http://www.sqlite.org/features.html claim that SQLite is durable during power failures; and DELETE is the default journal_mode. Also, other pages,

Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-22 Thread Klaas V
Dear fellow SQLite afficionados,   Thanumalayan Sankaranarayana Pillai wrote:   "I expect it wouldn't be a problem with WAL" Thé SQLite (not wanting, but cobsidering him at leat  kind of) Force D. Richard H.  [who does not know Him don't read this message, you won;t

Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-22 Thread Thanumalayan Sankaranarayana Pillai
No, I have reported everything. The only thing I missed might be that it's not "5 seconds" always, but rather the configurable commit interval of the filesystem, which is by default 5 seconds in most desktop Linux distros. I only read through the source code of test6.c, and misunderstood that

Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-22 Thread Richard Hipp
On Wed, May 22, 2013 at 8:31 AM, thanumalayan mad wrote: > > Also, not to spam, but it would be great if you could answer these > questions for my research (you might send me a reply directly without going > through the mailing list): [a] Was it always understood that unlink()

Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-22 Thread Richard Hipp
On Sat, May 18, 2013 at 4:41 AM, thanumalayan mad wrote: > > Expected result: You always find that the transaction had been executed. > Observed result: You sometimes find that the transaction did not execute. > The core team has discussed this. In order to avoid a

Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-22 Thread Thanumalayan Sankaranarayana Pillai
Thank you for your replies! I now fully understand (and appreciate) that the "ACI" part of transactions is the most important. Also, I didn't notice any of ACI being broken: SQLite guarantees those conditions really well. However, just to be clear, my "potential bug" affects out-of-the-box Fedora

Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-21 Thread Richard Hipp
On Tue, May 21, 2013 at 12:04 PM, Thanumalayan Sankaranarayana Pillai < madth...@cs.wisc.edu> wrote: > Hi all, > > Did anyone look into this? I might be setting some config option wrong, > so it would be great if you sent me a "you did something wrong" reply if > you feel that I might have the

Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-21 Thread Simon Slavin
On 21 May 2013, at 5:04pm, Thanumalayan Sankaranarayana Pillai wrote: > Did anyone look into this? I might be setting some config option wrong, > so it would be great if you sent me a "you did something wrong" reply if > you feel that I might have the wrong config (or

Re: [sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-21 Thread Thanumalayan Sankaranarayana Pillai
Hi all, Did anyone look into this? I might be setting some config option wrong, so it would be great if you sent me a "you did something wrong" reply if you feel that I might have the wrong config (or might be doing something totally idiotic). I tested with a few other Linux machines and a few

[sqlite] Potential bug in crash-recovery code: unlink() and friends are not synchronous

2013-05-18 Thread thanumalayan mad
Hi All, I was testing out SQLite with a framework I developed. I believe, while running on Linux, transactions might not be durable when a power crash happens immediately after a commit. I observed this using "SQLite version 3.7.16.2 2013-04-12 11:52:43", and kernel "3.8.4-102.fc17.x86_64". Steps