You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2017/04/18 15:54:45 UTC

[couchdb] 02/02: Correctly delete writer information from ?OPENERS in mem3_shards

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch COUCHDB-3376-fix-mem3-shards
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 3746e3c44a905f06f85d77930015a62f4a52e00c
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Tue Apr 18 01:16:21 2017 -0400

    Correctly delete writer information from ?OPENERS in mem3_shards
    
    `?OPENERS` is an ETS table of type bag. To delete one specific object have to
    use `ets:delete_object(Tab, Object)`
    
    Without this fix writers were never cleaned up and no new writers could be
    spawned.
    
    COUCHDB-3376
---
 src/mem3/src/mem3_shards.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mem3/src/mem3_shards.erl b/src/mem3/src/mem3_shards.erl
index af9417a..5cdbc6c 100644
--- a/src/mem3/src/mem3_shards.erl
+++ b/src/mem3/src/mem3_shards.erl
@@ -480,7 +480,7 @@ shard_writer(DbName, Shards, IdleTimeout) ->
             ok
         end
     after
-        true = ets:delete(?OPENERS, {DbName, self()})
+        true = ets:delete_object(?OPENERS, {DbName, self()})
     end.
 
 flush_write(DbName, Writer, WriteTimeout) ->

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.