incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Benesch <ja...@realestatetomato.com>
Subject Re: Newbie question: compaction and mvcc consistency?
Date Wed, 26 May 2010 19:33:03 GMT
I can't really speak to the compaction side, but I know you check for
changes to the database using Change Notifications...

curl -X GET "$HOST/db/_changes?feed=continuous"

http://books.couchdb.org/relax/reference/change-notifications


> So long as reader (i) is reading a document (r), if updates to the
> document introduce an effective change from r->s, if after 's' has
> been added the database were compacted, what would reader (i) see?

You can always proactively attack the issue by dynamically updating the
document...


On Wed, May 26, 2010 at 12:00 PM, Randall Leeds <randall.leeds@gmail.com>wrote:

> On Wed, May 26, 2010 at 11:37, Robert Buck <buck.robert.j@gmail.com>
> wrote:
> > Here is a newbie question for you that relates MVCC, compaction, and
> versioning.
> >
> > I read that old versions of documents are cleaned up upon compaction.
> > I read that every b-tree root will point to a consistent snapshot of
> > the database.
> > I read that there could be readers reading three different versions
> > [of a document] at the same time [due to timing of reads vs writes].
>
> Yay!
>
> >
> > So long as reader (i) is reading a document (r), if updates to the
> > document introduce an effective change from r->s, if after 's' has
> > been added the database were compacted, what would reader (i) see?
> > Would document (r) be pulled out from under reader (i) or would the
> > document remain until such time as the reader no longer refers to it?
>
> The switch to the new, compacted database won't happen so long as
> there are references to the old one. (r) will not disappear until (i)
> is done with it.
>



-- 
Jason Benesch

We just launched www.TomatoUniversity.com - Join for free!
Technology Training for the Real Estate Industry.

Real Estate Tomato
Co-owner
www.realestatetomato.com
(619) 770-1950
jason@realestatetomato.com

ListingPress
Owner, Founder
www.listingpress.com
(619) 955-7465
jason@listingpress.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message