So, is any experienced Wt dev confirming this is a Wt bug ?


Le 26/08/2012 20:27, Offirmo a écrit :
So, after tinkering myself, I found some explanations and, maybe, a Wt bug.

It happen that I am using the auth module described in the auth tutorial. (I use Wt latest from git)

I have this line :

session_.login().changed().connect(this, &AuthApplication::authEvent);

and then the auth event occur (I register a new account).

authEvent() get executed. And it strongly seems that there is a pending write transaction in progress from the auth code at this time !

So I cannot write anything in database inside the authEvent() callback, which is very annoying. Isn't it usual, when a user is created, to create some tables for him ?

I have temporarily solved the problem by using two databases : one for auth and one for my datas. It works this way, the pending auth transaction don't disturb my own data.

May I suggest this is a Wt bug, to have a pending transaction when calling the session_.login().changed() callback ?

Best regards.



Le 26/08/2012 14:56, Offirmo a écrit :
Hello all,

I'm still working on my Wt app and who knows, maybe I'll have something to show you one day ?

But for the moment, I'm stuck with this error :
[error] "Wt: error during event handling: Sqlite3: insert into ""real_user"" (""version"", ""email"", ""creation_date"", ""last_modif_date"", ""sti_type"", ""denomination"") values (?, ?, ?, ?, ?, ?): database is locked" [error] "Wt: fatal error: Sqlite3: insert into ""real_user"" (""version"", ""email"", ""creation_date"", ""last_modif_date"", ""sti_type"", ""denomination"") values (?, ?, ?, ?, ?, ?): database is locked"

I've looked a bit on google and I understand that it *may* mean that there is another pending SQL request on the same data. But I can't find such thing in my app (which is quite simple at that time).

To remove most possibilites, the code that gives this error is now very short :

    // then add it to db
    {
        // again, in its own transaction
        Wt::Dbo::Transaction transaction(dbo_session);
        element_ptr = dbo_session.add(p);
        transaction.commit();
    }

Do you have any clue on what may cause this "database is locked" error ? I'm stuck...

Thanks.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to