You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Diogo Júnior <di...@fraunhofer.pt> on 2014/05/26 13:30:28 UTC

Couchdb minimum revs_limit and Compact feature

Hi,

I would like to have just 10 revisions stored for a specific document in a database and I'm setting the revs_limit to 10 and then running the compact. However the compact has no effects! The document keeps with more than 10 revisions stored in the database.

There is a minimum for revs_limit?

Thanks,
--
Eng.º Diogo Júnior
Researcher | R&D Department

Fraunhofer Portugal AICOS
Edifício Central Rua Alfredo Allen, 455/461
4200-135 Porto Portugal
How to find us
Phone: +351 22 0408 300
www: www.fraunhofer.pt


Re: Couchdb minimum revs_limit and Compact feature

Posted by Robert Samuel Newson <rn...@apache.org>.
Hi,

It sounds like your compaction is not completing. After completion only the latest revision of each document is preserved. _revs_limit refers only to how many old _rev values are retained. Lowering this value will save some storage but can also make replication less efficient as a failure to find a common ancestor will cause couchdb to copy the document afresh.

TL;DR _revs_limit does not do what you think it does, couchdb is not a revision control system.

B.


On 26 May 2014, at 12:30, Diogo Júnior <di...@fraunhofer.pt> wrote:

> Hi,
> 
> I would like to have just 10 revisions stored for a specific document in a database and I'm setting the revs_limit to 10 and then running the compact. However the compact has no effects! The document keeps with more than 10 revisions stored in the database.
> 
> There is a minimum for revs_limit?
> 
> Thanks,
> --
> Eng.º Diogo Júnior
> Researcher | R&D Department
> 
> Fraunhofer Portugal AICOS
> Edifício Central Rua Alfredo Allen, 455/461
> 4200-135 Porto Portugal
> How to find us
> Phone: +351 22 0408 300
> www: www.fraunhofer.pt
> 


Re: Couchdb minimum revs_limit and Compact feature

Posted by Guilherme Andrade <g...@gandrade.net>.
Hello,

IIRC compaction only runs if the specified conditions (in config) are
met -- in this case, the 'db_fragmentation'[1] setting. Might be wrong
though; maybe this only applies to automatic compaction and not the
manually triggered one.

Cheers,


On 26/05/14 12:30, Diogo Júnior wrote:
> Hi,
>
> I would like to have just 10 revisions stored for a specific document in a database and I'm setting the revs_limit to 10 and then running the compact. However the compact has no effects! The document keeps with more than 10 revisions stored in the database.
>
> There is a minimum for revs_limit?
>
> Thanks,
> --
> Eng.º Diogo Júnior
> Researcher | R&D Department
>
> Fraunhofer Portugal AICOS
> Edifício Central Rua Alfredo Allen, 455/461
> 4200-135 Porto Portugal
> How to find us
> Phone: +351 22 0408 300
> www: www.fraunhofer.pt
>
>

-- 
Guilherme Andrade

PGP fingerprint: 1968 5252 3901 B40F ED8A  D67A 9330 79B1 35CB 8191