On Wed, Jun 25, 2014 at 2:19 PM, Igor Tandetnik <i...@tandetnik.org> wrote:

> On 6/25/2014 5:19 AM, João Ramos wrote:
>
>> And I understand the limitations a shared-cache mode may have, but if this
>> is to be the case, it should be documented. I can be wrong, but I didn't
>> find anywhere in the docs where this scenario is presented (or has some
>> sort of warning).
>>
>
> Well, one can't document every possible scenario, every possible
> interaction of various features. There's a documentation on shared cache,
> complete with a nice picture explaining how all connections to the cache
> share a single connection to the underlying database file:
>
> http://sqlite.org/sharedcache.html
> "Externally, from the point of view of another process or thread, two or
> more database connections using a shared-cache appear as a single
> connection. The locking protocol used to arbitrate between multiple
> shared-caches or regular database users is described elsewhere."
>

Of course and I understand what your saying, and I'm not asking to document
every single feature interaction. However, the documentation never mentions
the possibility of data visibility changes caused by the shared-cache mode
and, in my opinion, it's a big enough issue that should merit being
referenced in the documentation.


>
> Then there's documentation on WAL mode, explaining how it is possible for
> a writer to co-exist with readers, via page versioning.
>
> http://www.sqlite.org/wal.html


Now that you mentioned the WAL, shouldn't this actually help prevent this
scenario? I've never looked at SQLite implementation, but if a transaction
starts after a successful commit (T1), the new data it tries to access
shouldn't be cached because it was just now written to the WAL, correct?


>
>
> If you use both features, you kind of have to put two and two together to
> see how they would interact.


Well, the way I see it, it's more like a 10 variable equation: not that
obvious. But that could be just me.


>
> --
> Igor Tandetnik
>
> _______________________________________________
> 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

Reply via email to