Farshid Ghods (Inactive)
added a comment - 03/Dec/12 8:26 PM this is not a blocker bug because it does not destroy any data.
we can add this to documentation that resetting the index path will restart the couchbase server

It's not really because of index path change. The problem is that we introduced a regression that would kill memcached port (not memcached itself) only after 60 seconds of wait. In some scenarios this could cause a data loss. For instance, if someone shut couchbase server down and then reboots the machine. On the moment of reboot there can still be memcached process alive writing something to databases.

Aliaksey Artamonau
added a comment - 03/Dec/12 8:32 PM It's not really because of index path change. The problem is that we introduced a regression that would kill memcached port (not memcached itself) only after 60 seconds of wait. In some scenarios this could cause a data loss. For instance, if someone shut couchbase server down and then reboots the machine. On the moment of reboot there can still be memcached process alive writing something to databases.

can you confirm the expected behavior ( after your fix ) :
1- should couchbase server itself restart ?
2- should memcached restart ?
3- does this restart mccouch ?
4- current index files are wiped out or kept as it is?
5- what happens to the ddoc definitions ? do they get copied over from original to the new location
6- does this API change the index path for all nodes in the cluster or is this per node ?

Farshid Ghods (Inactive)
added a comment - 04/Dec/12 10:42 AM Alaiksey ,
can you confirm the expected behavior ( after your fix ) :
1- should couchbase server itself restart ?
2- should memcached restart ?
3- does this restart mccouch ?
4- current index files are wiped out or kept as it is?
5- what happens to the ddoc definitions ? do they get copied over from original to the new location
6- does this API change the index path for all nodes in the cluster or is this per node ?

1-3. Yes, to apply path changes ns_server restarts itself entirely including memcached and mccouch.
4. Current index files are kept intact.
5. Design document definitions are stored in master database that is stored together with other databases (i.e. in the database directory).
6. The API is per node.

We found that the issue was that we didn't wait for memcached termination correctly. Then ns_server would start memcached again while the previous instance was still shutting down. Probably because it's windows, no eaddrinuse errors were reported. ns_server was just unable to connect to memcached. When old memcached instance finally died, node returned to a good state.

Aliaksey Artamonau
added a comment - 05/Dec/12 3:22 PM We found that the issue was that we didn't wait for memcached termination correctly. Then ns_server would start memcached again while the previous instance was still shutting down. Probably because it's windows, no eaddrinuse errors were reported. ns_server was just unable to connect to memcached. When old memcached instance finally died, node returned to a good state.