> On Apr 20, 2015, at 12:28 PM, Frederic Yesid Peña Sánchez 
> <[email protected]> wrote:
> 
> So the issue here is that the "revision" info, that "list" of revisions is 
> getting too long (and not that the document itself is holding a lot of 
> revisions), and that may be collapsing my DB, so i'ts safe to trim that 
> revision tree?? cut from 1000 lines to 20 for example??

Unless there are conflicts, it shouldn’t be getting longer than the RevsLimit 
configured for the database. Did you edit your configuration to set a lower 
RevsLimit? (And note that the change doesn’t apply to a document until the next 
time it’s saved.)

> If i trim the revs, parents and deleted arrays at the same time, leaving the 
> last 20 items, do this will trim my history tree?.

No! This will just break the revision tree and cause Go panics when accessing 
the document. Please read the comments on the revTreeList struct in revtree.go. 
"Ordering in the arrays doesn't matter.” (It’s random, determined only by the 
order in which the hash table is enumerated.)

It is possible to edit the JSON to trim old revisions, but it will take a good 
knowledge of the schema it’s written in. Hopefully the revTreeList struct and 
the MarshalJSON method have enough info to figure out the details.

I don’t want to tell you not to hack on this :) but if you do so, you’re 
entering the territory of a SG developer. It would be great if you found bugs 
or inefficiencies in managing the rev tree, and even better if you sent us 
fixes, but please don’t do this to any database you plan to use in production. 
(Or if you do, don’t ask us for help with resulting problems because they’re 
going to be impossible for us to troubleshoot without understanding the changes 
you’ve made to the code…)

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/48960EBA-CAF6-4DB4-90E8-94E051658C4C%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to