You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/04/17 17:27:57 UTC

[GitHub] nickva commented on a change in pull request #476: Couchdb 3376 fix mem3 shards

nickva commented on a change in pull request #476: Couchdb 3376 fix mem3 shards
URL: https://github.com/apache/couchdb/pull/476#discussion_r111778890
 
 

 ##########
 File path: src/mem3/src/mem3_shards.erl
 ##########
 @@ -320,8 +360,20 @@ load_shards_from_disk(DbName) when is_binary(DbName) ->
 load_shards_from_db(#db{} = ShardDb, DbName) ->
     case couch_db:open_doc(ShardDb, DbName, [ejson_body]) of
     {ok, #doc{body = {Props}}} ->
+        Seq = couch_db:get_update_seq(ShardDb),
         Shards = mem3_util:build_ordered_shards(DbName, Props),
-        gen_server:cast(?MODULE, {cache_insert, DbName, Shards}),
+        case maybe_spawn_shard_writer(DbName, Shards) of
 
 Review comment:
   This doesn't seem right. We link writer to the caller. If caller process dies it take writer with it and writer never gets a chance to clean itself up thus blocking any other future writers from being created because of 
   
   ```
   case ets:member(?OPENERS, DbName) of   true ->   ignore;
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services