couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [23/48] mem3 commit: updated refs/heads/windsor-merge to ff02b9a
Date Fri, 01 Aug 2014 09:11:09 GMT
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/windsor-merge
Commit: 2f62e2e5586978bd39d59bad060d5168659e6dc5
Parents: a29e6b7
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Thu Sep 5 14:08:48 2013 -0500
Committer: Robert Newson <rnewson@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.


Mime
View raw message