You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/28 14:22:40 UTC

[20/50] mem3 commit: updated refs/heads/master to 64c0c74

Fix latent single-shard range hack

We had an off-by-one error when we fake #shard{} records for node local
databases. This fixes the issue. The bug was noticeable when attempting
to pass these shards to `fabric_view:is_progress_possible/1`.

BugzId: 22809


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/commit/2f62e2e5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/tree/2f62e2e5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/diff/2f62e2e5

Branch: refs/heads/master
Commit: 2f62e2e5586978bd39d59bad060d5168659e6dc5
Parents: a29e6b7
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Sep 5 14:08:48 2013 -0500
Committer: Robert Newson <rn...@apache.org>
Committed: Wed Jul 23 18:46:26 2014 +0100

----------------------------------------------------------------------
 src/mem3.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/2f62e2e5/src/mem3.erl
----------------------------------------------------------------------
diff --git a/src/mem3.erl b/src/mem3.erl
index 02e929f..8bbbbae 100644
--- a/src/mem3.erl
+++ b/src/mem3.erl
@@ -94,7 +94,7 @@ shards_int(DbName, Options) ->
             node = node(),
             name = ShardDbName,
             dbname = ShardDbName,
-            range = [0, 2 bsl 31],
+            range = [0, (2 bsl 31)-1],
             order = undefined}];
     ShardDbName ->
         %% shard_db is treated as a single sharded db to support calls to db_info
@@ -103,7 +103,7 @@ shards_int(DbName, Options) ->
             node = node(),
             name = ShardDbName,
             dbname = ShardDbName,
-            range = [0, 2 bsl 31]}];
+            range = [0, (2 bsl 31)-1]}];
     _ ->
         mem3_shards:for_db(DbName, Options)
     end.