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/07/24 20:41:53 UTC

[couchdb] branch optimize-ddoc-cache updated (0d2e182 -> d354951)

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

davisp pushed a change to branch optimize-ddoc-cache
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


    omit 0d2e182  FIXUP: Label state variable with a name
     new 61ae43a  FIXUP: Label state variable with a name
     new d354951  FIXUP: Use the shard record definition

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (0d2e182)
            \
             N -- N -- N   refs/heads/optimize-ddoc-cache (d354951)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/ddoc_cache/test/ddoc_cache_entry_test.erl    | 2 +-
 src/ddoc_cache/test/ddoc_cache_eviction_test.erl | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

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

[couchdb] 01/02: FIXUP: Label state variable with a name

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch optimize-ddoc-cache
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 61ae43a3a0818be138676c8cc89465fa695160e8
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Mon Jul 24 15:28:13 2017 -0500

    FIXUP: Label state variable with a name
---
 src/ddoc_cache/test/ddoc_cache_entry_test.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/ddoc_cache/test/ddoc_cache_entry_test.erl b/src/ddoc_cache/test/ddoc_cache_entry_test.erl
index 49b24a9..dd7a039 100644
--- a/src/ddoc_cache/test/ddoc_cache_entry_test.erl
+++ b/src/ddoc_cache/test/ddoc_cache_entry_test.erl
@@ -107,12 +107,14 @@ evict_when_not_accessed(_) ->
     true = ets:insert_new(?CACHE, #entry{key = Key}),
     {ok, Entry} = ddoc_cache_entry:start_link(Key, undefined),
     Ref = erlang:monitor(process, Entry),
-    ?assertEqual(1, element(7, sys:get_state(Entry))),
+    AccessCount1 = element(7, sys:get_state(Entry)),
+    ?assertEqual(1, AccessCount1),
     ok = gen_server:cast(Entry, refresh),
 
     meck:wait(ddoc_cache_ev, event, [update_noop, Key], 1000),
 
-    ?assertEqual(0, element(7, sys:get_state(Entry))),
+    AccessCount2 = element(7, sys:get_state(Entry)),
+    ?assertEqual(0, AccessCount2),
     ok = gen_server:cast(Entry, refresh),
     receive {'DOWN', Ref, _, _, Reason} -> Reason end,
     ?assertEqual(normal, Reason),

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

[couchdb] 02/02: FIXUP: Use the shard record definition

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch optimize-ddoc-cache
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit d354951d11fc0cb9a1ee5b8b63845af7a937e525
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Mon Jul 24 15:41:26 2017 -0500

    FIXUP: Use the shard record definition
---
 src/ddoc_cache/test/ddoc_cache_eviction_test.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/ddoc_cache/test/ddoc_cache_eviction_test.erl b/src/ddoc_cache/test/ddoc_cache_eviction_test.erl
index 30b4fb7..5a02a5c 100644
--- a/src/ddoc_cache/test/ddoc_cache_eviction_test.erl
+++ b/src/ddoc_cache/test/ddoc_cache_eviction_test.erl
@@ -20,6 +20,7 @@
 
 -include_lib("couch/include/couch_db.hrl").
 -include_lib("eunit/include/eunit.hrl").
+-include_lib("mem3/include/mem3.hrl").
 -include("ddoc_cache_test.hrl").
 
 
@@ -55,7 +56,7 @@ evict_all({DbName, _}) ->
     ddoc_cache_tutil:clear(),
     meck:reset(ddoc_cache_ev),
     Rev = ddoc_cache_tutil:get_rev(DbName, ?FOOBAR),
-    ShardName = element(2, hd(mem3:shards(DbName))),
+    #shard{name = ShardName} = hd(mem3:shards(DbName)),
     {ok, _} = ddoc_cache:open_doc(DbName, ?FOOBAR),
     {ok, _} = ddoc_cache:open_doc(DbName, ?FOOBAR, Rev),
     {ok, _} = ddoc_cache:open_validation_funs(DbName),

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