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 16:22:20 UTC

[couchdb] branch optimize-ddoc-cache updated: FIXUP: Reorder clauses for readability

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


The following commit(s) were added to refs/heads/optimize-ddoc-cache by this push:
     new 4d54571  FIXUP: Reorder clauses for readability
4d54571 is described below

commit 4d545714e504bb7d8a196265ff8434e5eb95e456
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Mon Jul 24 11:22:11 2017 -0500

    FIXUP: Reorder clauses for readability
---
 src/ddoc_cache/src/ddoc_cache_lru.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/ddoc_cache/src/ddoc_cache_lru.erl b/src/ddoc_cache/src/ddoc_cache_lru.erl
index 17fa14b..3300f3d 100644
--- a/src/ddoc_cache/src/ddoc_cache_lru.erl
+++ b/src/ddoc_cache/src/ddoc_cache_lru.erl
@@ -258,11 +258,11 @@ trim(St, MaxSize) ->
     couch_log:error("SIZE: ~b :: ~b~n", [CurSize, MaxSize]),
     if CurSize =< MaxSize -> ok; true ->
         case ets:first(?LRU) of
-            '$end_of_table' ->
-                full;
             {_Ts, Key, Pid} ->
                 remove_entry(St, Key, Pid),
-                trim(St, MaxSize)
+                trim(St, MaxSize);
+            '$end_of_table' ->
+                full
         end
     end.
 

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