sqlite3 Asynchronous I/O

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

sqlite3 Asynchronous I/O

Prajeesh Prakash
Hi Members,

I am using sqlite3 Asynchronous I/O on my application. So is there any way to get the status of the DB update (After the write operation) from the asyncWriterThread  so that my application can do the proper error handling.

I am expecting a reply.

Thank you

Prajeesh P
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3 Asynchronous I/O

Shawn Wagner
By asynchronous i/o, do you mean the vfs module described here:
https://www.sqlite.org/asyncvfs.html ?

On Tue, Nov 27, 2018, 1:24 AM Prajeesh Prakash
<[hidden email] wrote:

> Hi Members,
>
> I am using sqlite3 Asynchronous I/O on my application. So is there any way
> to get the status of the DB update (After the write operation) from the
> asyncWriterThread  so that my application can do the proper error handling.
>
> I am expecting a reply.
>
> Thank you
>
> Prajeesh P
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3 Asynchronous I/O

Prajeesh Prakash
Yes it is.

>
>     On November 27, 2018 at 3:12 PM Shawn Wagner <[hidden email]> wrote:es
>
>     By asynchronous i/o, do you mean the vfs module described here:
>     https://www.sqlite.org/asyncvfs.html ?
>
>     On Tue, Nov 27, 2018, 1:24 AM Prajeesh Prakash
>     <[hidden email] wrote:
>
>         > >
> >         Hi Members,
> >
> >         I am using sqlite3 Asynchronous I/O on my application. So is there any way
> >         to get the status of the DB update (After the write operation) from the
> >         asyncWriterThread so that my application can do the proper error handling.
> >
> >         I am expecting a reply.
> >
> >         Thank you
> >
> >         Prajeesh P
> >
> >         _______________________________________________
> >         sqlite-users mailing list
> >         [hidden email]
> >         http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >         _______________________________________________
> >         sqlite-users mailing list
> >         [hidden email]
> >         http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >     >
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3 Asynchronous I/O

Prajeesh Prakash
In reply to this post by Shawn Wagner
Yes it is, On sqlite3async.c file i found asyncWriterThread but i didn't find any callback to let the application know the status of the DB update. How this thread writing the data to DB, I am little bit confused.

>
>     On November 27, 2018 at 3:12 PM Shawn Wagner <[hidden email]> wrote:
>
>     By asynchronous i/o, do you mean the vfs module described here:
>     https://www.sqlite.org/asyncvfs.html ?
>
>     On Tue, Nov 27, 2018, 1:24 AM Prajeesh Prakash
>     <[hidden email] wrote:
>
>         > >
> >         Hi Members,
> >
> >         I am using sqlite3 Asynchronous I/O on my application. So is there any way
> >         to get the status of the DB update (After the write operation) from the
> >         asyncWriterThread so that my application can do the proper error handling.
> >
> >         I am expecting a reply.
> >
> >         Thank you
> >
> >         Prajeesh P
> >
> >         _______________________________________________
> >         sqlite-users mailing list
> >         [hidden email]
> >         http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >         _______________________________________________
> >         sqlite-users mailing list
> >         [hidden email]
> >         http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >     >
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3 Asynchronous I/O

Olivier Mascia
In reply to this post by Prajeesh Prakash
Dear,

> Le 27 nov. 2018 à 10:24, Prajeesh Prakash <[hidden email]> a écrit :
>
> I am using sqlite3 Asynchronous I/O on my application. So is there any way to get the status of the DB update (After the write operation) from the asyncWriterThread  so that my application can do the proper error handling.

Then:

>>    On November 27, 2018 at 3:12 PM Shawn Wagner <[hidden email]> wrote:
>>
>>    By asynchronous i/o, do you mean the vfs module described here:
>>    https://www.sqlite.org/asyncvfs.html ?
>
> Le 27 nov. 2018 à 10:47, Prajeesh Prakash <[hidden email]> a écrit :
>
> Yes it is, On sqlite3async.c file i found asyncWriterThread but i didn't find any callback to let the application know the status of the DB update. How this thread writing the data to DB, I am little bit confused.

Are you 100% sure that choosing the asyncvfs is the right thing to do for your needs?

As clearly written on https://www.sqlite.org/asyncvfs.html:

"...this module is no longer supported. The source code continues to exist in the SQLite source tree, but it is not a part of any standard build and is no longer maintained. This documentation is retained for historical reference."

Then the paragraph 1.0 on that page clearly describe the intent of this asyncvfs, to decouple the requests for writes and the writes themselves, immediately returning to the caller before the writes have occurred: "Asynchronous I/O appears to give better responsiveness, but at a price.  You lose the Durable property."

All this seems to go in the opposite direction of your intent (seeing your other posts around this asyncvfs subject). But I may be wrong about your needs and intents, as you didn't explained what problem you are trying to solve by choosing to use some old code from the attic and then looking for ways to get it do things it clearly wasn't designed to do.

Maybe some background information about the specifics constraints of your runtime environment, which lead you to believe the asyncvfs was the right thing to use, would help people understand and guide you to a proper solution.

--
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users