[MB-6342] User-triggered compaction of view `default/_design/dev_view4` failed: shutdown, when rebalancing out a server node Created: 21/Aug/12  Updated: 09/Jan/13  Resolved: 23/Aug/12

Status: Closed
Project: Couchbase Server
Component/s: ns_server, view-engine
Affects Version/s: 2.0-beta
Fix Version/s: 2.0
Security Level: Public

Type: Bug Priority: Minor
Reporter: Karan Kumar (Inactive) Assignee: Aliaksey Artamonau
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: CentOS 64 bit

Attachments: GZip Archive ns-diag-20120821005704.txt.gz    


1) Swap rebalance one node in and out
2) Trigger compaction for production view

We see the following error on all the nodes in the cluster:-
User-triggered compaction of view `default/_design/dev_view4` failed: shutdown. See logs for detailed reason.

We should probably ignore bucket shutdown error.
Along the same lines as

[ns_server:warn,2012-08-21T0:57:56.407,ns_1@<0.15895.9>:compaction_daemon:do_chain_compactors:520]Compactor for view `default-s/_design/dev_view1` (pid [{type,view},
                                                          false,bucket]}}]) terminated unexpectedly (ignoring this): {updater_died,

[ns_server:warn,2012-08-21T0:17:30.366,ns_1@<0.15369.9>:compaction_daemon:do_chain_compactors:515]Compactor for view `default/_design/dev_view4/main` (pid [{type,view},
                                                              <<"_design/dev_view4">>}]}}]) terminated unexpectedly: shutdown

Comment by Filipe Manana [ 21/Aug/12 ]
This is normal to happen during rebalance and can safelly be ignored.
Comment by Filipe Manana [ 21/Aug/12 ]
At The very best, ns_ server compaction daemon can ignore this particular exit reason and retry immediately or leave it for next iteration.
Comment by Aliaksey Artamonau [ 21/Aug/12 ]
The problem with user-triggered compactions here is that in case something goes wrong we show the error in the UI log. So it might be confusing for the user to see this kind of errors. But it's not trivial to ignore those because the actual error can look differently. For instance, in one case above it's just 'shutdown', in the other {updater_died, {updater_error, shutdown}}. There can be other variants probably.
Comment by Filipe Manana [ 21/Aug/12 ]
Aliaksey, the only expected, harmless exit reasons, are:

{updater_died, shutdown}
{updater_died, noproc}
Comment by Karan Kumar (Inactive) [ 21/Aug/12 ]
Thanks. I would believe these would still get logged in ns_server logs and be not UI visible?
Comment by Thuan Nguyen [ 22/Aug/12 ]
Integrated in github-ns-server-2-0 #448 (See [http://qa.hq.northscale.net/job/github-ns-server-2-0/448/])
    MB-6342 Restart view compaction when getting shutdown errors. (Revision eed96a45ef4182debd1a3d5d8b9550f8e904b0b6)

     Result = SUCCESS
Aliaksey Kandratsenka :
Files :
* src/compaction_daemon.erl
Generated at Sun Sep 21 10:03:09 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.