Skip to content

Commit

Permalink
[FAB-7131] CouchDB: per channel-chaincode DB
Browse files Browse the repository at this point in the history
For every chaincode, use a separate database instead of using
the same channel database. This CR makes the following changes:
(i) creates a database per channel_chaincode and two DBs per
channel_chaincode_collection (one for hashed data and another for
actual private data).
(ii) modifies GetState, RangeQuery, and ExecuteQuery implementation
to use appropriate chaincode DB as per the given namespace.
(iii) modifies commit process (ApplyUpdates) to apply changes to
respective chaincode DBs.

In the subsequent CR, for loadCommittedVersions and ApplyUpdates,
goroutines would be used to process each chaincode batches
parallely.

Change-Id: I05b5f70e6c253cec683382c9e5b2b39b6a6bcce8
Signed-off-by: senthil <cendhu@gmail.com>
  • Loading branch information
cendhu committed Jan 5, 2018
1 parent fc4298b commit 6cbebf4
Show file tree
Hide file tree
Showing 6 changed files with 243 additions and 173 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

const (
nsJoiner = "/"
nsJoiner = "$"
pvtDataPrefix = "p"
hashDataPrefix = "h"
)
Expand Down
Loading

0 comments on commit 6cbebf4

Please sign in to comment.