Hi,

indeed, creating a "test" database resulted in 8 shards being exposed on
the backdoor port. The names seem to have the following format:
shards/<range>/<db>.<timestamp>

Trying to compact one of the shards with:

curl -X POST -H "Content-Type: application/json"
http://localhost:5986/shards%2F00000000-1fffffff%2Ftest.1431809838/_compact

resulted in

{"ok":true}

So I guess that's the correct way to do it.

Thanks!

On Fri, May 15, 2015 at 10:19 PM, Sebastian Rothbucher <
[email protected]> wrote:

> Hi,
>
> the point is when the database is clustered, it's split up in many
> databases really with long IDs in their names, so it's not just "use the
> backdoor port". Do an _all_dbs on the backdoor port to find out the exact
> names.
> I never tried to compact them manually - you may want to backup before
> trying. Btw: there is a discussion already going on:
>
> http://mail-archives.apache.org/mod_mbox/couchdb-dev/201505.mbox/%3C20150513202728.BF32125093%40wilderness.apache.org%3E
>
> Good luck - sorry there is no silver bullet here. Would be great when you
> can let us know your result / experience!
>      Sebastian
>
> On Fri, May 15, 2015 at 10:14 PM, Hristo Trendev <[email protected]>
> wrote:
>
> > Hi,
> >
> > I've tried this one as well, but the error was:
> >
> > {"error":"not_found","reason":"no_db_file"}
> >
> > It seems that the 5986 endpoint doesn't know anything about the database.
> > If compaction needs to be done per-shard, as the error message says, then
> > I'd expect to see something that identifies the shard to be compacted.
> Like
> > 00000000-1fffffff for example.
> >
> > On Fri, May 15, 2015 at 9:00 PM, Alexander Shorin <[email protected]>
> > wrote:
> >
> > > > I have also read in an email on the dev list, that this needs to be
> run
> > > against the 5986 port, but again no clue what the exact URL is. I have
> > > tried to guess it, but none of the combinations that I've tried did
> work.
> > >
> > > curl -XPOST http://localhost:5986/<db>/_compact
> > >
> > > Cluster-wide compaction is not supported yet, so you have to run it
> > > per node basis.
> > >
> > > --
> > > ,,,^..^,,,
> > >
> > >
> > > On Fri, May 15, 2015 at 6:48 PM, Hristo Trendev <[email protected]>
> > > wrote:
> > > > Hello,
> > > >
> > > > I have installed the 2.0 developer preview and I cannot figure out
> how
> > to
> > > > compact a database. Trying with
> > > >
> > > > curl http://localhost:5984/<db>/_compact
> > > >
> > > > results in
> > > >
> > > > {"error":"forbidden","reason":"Compaction must be triggered on a
> > > per-shard
> > > > basis in CouchDB"}
> > > >
> > > > I have found this related GUI ticket
> > > > https://issues.apache.org/jira/browse/COUCHDB-2492, but there is no
> > hint
> > > > how to actually start the compaction process manually. I have also
> read
> > > in
> > > > an email on the dev list, that this needs to be run against the 5986
> > > port,
> > > > but again no clue what the exact URL is. I have tried to guess it,
> but
> > > none
> > > > of the combinations that I've tried did work.
> > > >
> > > > Has anybody had any success with it?
> > > >
> > > > BR,
> > > > Hristo
> > >
> >
>

Reply via email to