There's one more issue I didn't tackle in this commit. All the
processes supervised by couch_secondary_services are automatically
specified as "workers", but couch_batch_save_sup and
couch_db_update_notifier_sup are actually supervisors and should be
spec'd as such in the tree.
Getting this stuff right is important for hot code upgrades using the
OTP release_handler. System messages are sent to processes during the
upgrade based on the supervision tree specifications. A supervisor
incorrectly identified as a worker can screw this process up. Best,
Adam
On Sep 12, 2009, at 12:39 PM, [email protected] wrote:
Author: kocolosk
Date: Sat Sep 12 16:39:24 2009
New Revision: 814189
URL: http://svn.apache.org/viewvc?rev=814189&view=rev
Log:
bugfixes in supervision tree specifications
Modified:
couchdb/trunk/src/couchdb/couch_batch_save_sup.erl
couchdb/trunk/src/couchdb/couch_server_sup.erl
Modified: couchdb/trunk/src/couchdb/couch_batch_save_sup.erl
URL:
http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_batch_save_sup.erl?rev=814189&r1=814188&r2=814189&view=diff
=
=
=
=
=
=
=
=
======================================================================
--- couchdb/trunk/src/couchdb/couch_batch_save_sup.erl (original)
+++ couchdb/trunk/src/couchdb/couch_batch_save_sup.erl Sat Sep 12
16:39:24 2009
@@ -33,5 +33,5 @@
"batch_save_interval","1000")),
Batch = {batch, {couch_batch_save, start_link, [BatchSize,
BatchInterval]},
- permanent, 1000, worker, [batch_save]},
+ permanent, 1000, worker, [couch_batch_save]},
{ok, {{one_for_one, 10, 3600}, [Batch]}}.
Modified: couchdb/trunk/src/couchdb/couch_server_sup.erl
URL:
http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_server_sup.erl?rev=814189&r1=814188&r2=814189&view=diff
=
=
=
=
=
=
=
=
======================================================================
--- couchdb/trunk/src/couchdb/couch_server_sup.erl (original)
+++ couchdb/trunk/src/couchdb/couch_server_sup.erl Sat Sep 12
16:39:24 2009
@@ -89,7 +89,7 @@
permanent,
brutal_kill,
worker,
- dynamic},
+ [couch_config]},
{couch_primary_services,
{couch_server_sup, start_primary_services, []},
permanent,
@@ -155,13 +155,13 @@
{couch_server, sup_start_link, []},
permanent,
brutal_kill,
- supervisor,
+ worker,
[couch_server]},
{couch_db_update_event,
{gen_event, start_link, [{local, couch_db_update}]},
permanent,
brutal_kill,
- supervisor,
+ worker,
dynamic}
]
}).