summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2018-05-24 10:26:05 -0400
committerAdam Kocoloski <kocolosk@apache.org>2018-05-24 10:26:05 -0400
commitcde61b34682fef6430277e56f8f1abfd9919f082 (patch)
tree20f89e708942d5610f3d57d4fac0420ee0330ec1
parent521ce6bf155556a8e155693807a5670016666e7c (diff)
downloadcouchdb-1338-node-flavors.tar.gz
Let the ets table update asynchronously1338-node-flavors
The config listener runs in a separate process that does not have write access to the mem3_nodes table. It should be sufficient to write to the DB and let mem3_nodes pick up that update and send it to the cache.
-rw-r--r--src/mem3/src/mem3_nodes.erl2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/mem3/src/mem3_nodes.erl b/src/mem3/src/mem3_nodes.erl
index 33e8d06c0..db59e8cd5 100644
--- a/src/mem3/src/mem3_nodes.erl
+++ b/src/mem3/src/mem3_nodes.erl
@@ -116,7 +116,6 @@ initialize_nodelist() ->
#doc{id = SelfId} = Doc ->
update_metadata(Db, Doc, NodeProps)
end,
- % TODO is this ignoring any update we just made above?
Seq = couch_db:get_update_seq(Db),
couch_db:close(Db),
Seq.
@@ -184,7 +183,6 @@ update_metadata(Db, #doc{body = {DocProps}} = Doc, NewProps) ->
% internal doc state matches .ini
ok;
MergedProps ->
- ets:insert(?MODULE, {node(), MergedProps}),
NewDoc = Doc#doc{body = {MergedProps}},
{ok, _} = couch_db:update_doc(Db, NewDoc, [])
end,