From a3cc1f2dcafb20cd483f039165655bf192469d68 Mon Sep 17 00:00:00 2001 From: Stephane Bourque Date: Sun, 1 Sep 2019 22:59:10 -0700 Subject: [PATCH] mc_worker_logic:make_request was being called with the wrong DB. Always called with the connection DB instead of the possible DB as a parameter. --- src/connection/mc_worker.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection/mc_worker.erl b/src/connection/mc_worker.erl index 7950ce8a..b2247c06 100644 --- a/src/connection/mc_worker.erl +++ b/src/connection/mc_worker.erl @@ -73,7 +73,7 @@ handle_call(CMD = #ensure_index{collection = Coll, index_spec = IndexSpec}, _, S mc_worker_logic:make_request( Socket, NetModule, - ConnState#conn_state.database, + DB, #insert{collection = mc_worker_logic:update_dbcoll(Coll, <<"system.indexes">>), documents = [Index]}), {reply, ok, State}; handle_call(Request, From, State) when ?WRITE(Request) -> % write requests (deprecated)