couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [couchdb] 02/02: Correctly delete writer information from ?OPENERS in mem3_shards
Date Tue, 18 Apr 2017 15:54:45 GMT
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 <vatamane@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" <commits@couchdb.apache.org>.

Mime
View raw message