Re: [sqlite] How does sqlite return the status of the data base?
from what I understood is that installing a busyhandler is equivalent to use a loop around your sqlite3_step() that tests against busy state. setting a timeout via sqlite3_busy_timeout works similar but doesn't allow to trace the busy states. please note that a LOCK state will not invoke the busy handler, as far as I know hope this helps Marcus Rick Pritchett wrote: > What I would like to do is if the data base returns a busy or locked status is > to set up my proc to retry the write. Or can I take care of this easier by > setting a long timeout? And from what I read timeout basically keeps retrying > the write for a specified amount of time. Is this correct? Or is it that the > write is retried again that time is reached? Also does sqlite use a > serialized > queue for processing the > transactions? > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Marcus Grimm, MedCom GmbH Darmstadt, Rundeturmstr. 12, 64283 Darmstadt Tel: +49(0)6151-95147-10 Fax: +49(0)6151-95147-20 -- MedCom slogans of the month: "Vacation ? -- Every day at MedCom is a paid vacation!" "Friday I have monday in my mind." "MedCom -- Every week a vacation, every day an event, every hour a cliffhanger, every minute a climax." "Damned, it's weekend again!" ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How does sqlite return the status of the data base?
Rick Pritchett <[EMAIL PROTECTED]> wrote: > What I would like to do is if the data base returns a busy or locked > status is to set up my proc to retry the write. Or can I take care > of this easier by setting a long timeout? And from what I read > timeout basically keeps retrying the write for a specified amount of > time. Is this correct? This is correct. > Or is it that the write is retried again > that time is reached? If you are asking whether the operation is only retried once after the timeout has elapsed - no, this is not the case. The operation is retried several times with short intervals, until either it succeeds or the timeout elapses. > Also does sqlite use a serialized queue for > processing the > transactions? I'm not sure I understand the question. What precisely do you mean by "serialized queue"? Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How does sqlite return the status of the data base?
Igor Tandetnik wrote: > I'm not sure I understand the question. What precisely do you mean by > "serialized queue"? > > Igor Tandetnik > Is it a repeated tautology? > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How does sqlite return the status of the data base?
Do you mean "First come first serve"? In that case, I suppose not, since there is no server processed involved, to mediate access. -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: Friday, November 07, 2008 10:44 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] How does sqlite return the status of the data base? Rick Pritchett <[EMAIL PROTECTED]> wrote: > Also does sqlite use a serialized queue for > processing the > transactions? I'm not sure I understand the question. What precisely do you mean by "serialized queue"? Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How does sqlite return the status of the data base
So how does it handle the transactions? Is it just however it retrieves them or just which notices that the DB is available? And how does sql return the state its in to the proc? > Message: 1 > Date: Fri, 7 Nov 2008 11:02:27 -0600 > From: "Ribeiro, Glauber" <[EMAIL PROTECTED]> > Subject: Re: [sqlite] How does sqlite return the status of the data > base? > To: "General Discussion of SQLite Database" > Message-ID: > <[EMAIL PROTECTED]> > > Content-Type: text/plain; charset="us-ascii" > > Do you mean "First come first serve"? > > In that case, I suppose not, since there is no server processed > involved, to mediate access. > > > > -Original Message- > From: Igor Tandetnik [mailto:[EMAIL PROTECTED] > Sent: Friday, November 07, 2008 10:44 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] How does sqlite return the status of the data > base? > > Rick Pritchett <[EMAIL PROTECTED]> wrote: > > Also does sqlite use a serialized queue for > > processing the > > transactions? > > I'm not sure I understand the question. What precisely do you mean by > "serialized queue"? > > Igor Tandetnik > > > > > > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How does sqlite return the status of the data base
Rick Pritchett <[EMAIL PROTECTED]> wrote: > So how does it handle the transactions? Is it just however it > retrieves them What do you mean, "retrieves them"? Retrieves from where? > or just which notices that the DB is available? And > how does sql return the state its in to the proc? When you call sqlite3_step, and the database is locked by another connection, the call returns SQLITE_BUSY error. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How does sqlite return the status of the data base
It uses OS-level file locking. Read http://sqlite.org/atomiccommit.html g -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: Friday, November 07, 2008 2:14 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] How does sqlite return the status of the data base Rick Pritchett <[EMAIL PROTECTED]> wrote: > So how does it handle the transactions? Is it just however it > retrieves them What do you mean, "retrieves them"? Retrieves from where? > or just which notices that the DB is available? And > how does sql return the state its in to the proc? When you call sqlite3_step, and the database is locked by another connection, the call returns SQLITE_BUSY error. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How does sqlite return the status of the data base
It uses OS-level file locking. Read http://sqlite.org/atomiccommit.html Here's some more: http://sqlite.org/lockingv3.html Documentation page: http://sqlite.org/docs.html g -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: Friday, November 07, 2008 2:14 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] How does sqlite return the status of the data base Rick Pritchett <[EMAIL PROTECTED]> wrote: > So how does it handle the transactions? Is it just however it > retrieves them What do you mean, "retrieves them"? Retrieves from where? > or just which notices that the DB is available? And > how does sql return the state its in to the proc? When you call sqlite3_step, and the database is locked by another connection, the call returns SQLITE_BUSY error. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users