Resync new Admin API is not in the documentation

157 views
Skip to first unread message

Martin Palatnik

unread,
Sep 20, 2014, 3:25:18 PM9/20/14
to mobile-c...@googlegroups.com
Hi, 

Just to let you know that the resync in the API is not in the official docs (is justa note in the release notes) and it is quite difficult to find. I spent a while this morning trying yo understand how to perform the resync and it was as easy as a admin call. Hope it helps if someone has this issue in the future.  

Cheers,
Martin


Jonathan

unread,
Sep 20, 2014, 11:29:18 PM9/20/14
to mobile-c...@googlegroups.com
I'm actually encountering this issue right now - care to elaborate what the mystical resync admin call is? I looked through release notes but didn't see anything.
-Jonathan

Jonathan

unread,
Sep 20, 2014, 11:38:18 PM9/20/14
to mobile-c...@googlegroups.com
In case the devs need more detail: 

On sync gateway config, I changed the sync() function.
I restarted sync gateway and received this message:

"db"'s sync function has changed. The new function may assign different channels to documents, or permissions to users. You may want to re-sync the database to update these.

... with no help on how to re-sync the database.

I'd imagine that changing the sync() function will be a very common occurrence during initial development and having an explanation of how to do it in the docs would be super helpful (or if it shouldn't be necessary, what I'm doing wrong).

Thanks,
-Jonathan

Andrew Reslan

unread,
Sep 21, 2014, 5:02:16 AM9/21/14
to mobile-c...@googlegroups.com
_resync is a database operation on the ADMIN REST API, e.g. invoke using curl

```

curl -X POST  http://127.0.0.1:4985/mydb/_resync

```


Output will be similar (depending on log config) to:

```

Re-running sync function on all 1 documents...

CRUD: Re-syncing document "doc1"

CRUD+: Invoking sync on doc "doc1" rev 1-cd809becc169215072fd567eebd8b8de

Finished re-running sync function; 0 docs changed


```

Andy

Martin Palatnik

unread,
Sep 21, 2014, 10:05:55 AM9/21/14
to mobile-c...@googlegroups.com
That's the call,

Martin

--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/V9_ohmXpanQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/28dd0718-87c5-49e2-a531-1aecce9770c6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jonathan

unread,
Sep 21, 2014, 11:14:58 AM9/21/14
to mobile-c...@googlegroups.com
Perfect, you guys are great. But it still belongs be in the documentation, methinks.
-Jonathan
Reply all
Reply to author
Forward
0 new messages