Re: #couchdb #fabric-chaincode #fabric-sdk-java #couchdb #fabric-chaincode #fabric-sdk-java

Matthew White

Hello; let me have a look at your repo... just to double check it couldn't be the perf issue fixes this week?
Regards, Matthew.
Matthew B White  IBM Blockchain Solutions Architect
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday 
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN

"The wrong answers are the ones you go looking for when the right answers stare you in the face"
----- Original message -----
From: "Marek Malik" <info@...>
Sent by: fabric@...
To: Senthilnathan N <cendhu@...>
Cc: "fabric@..." <fabric@...>
Subject: [EXTERNAL] Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java
Date: Fri, May 15, 2020 1:23 PM

Hello guys,

Sorry for being such a pain in the ass, but could one please help with that darn performance issue ?
I have tried to strip down my chaincode and do a copy-past of what the FabCar java chaincode has and do my chaincode on its based (both the setup and the chaincode build).

Not much have this helped, and I’m running out of points where my chaincode can differ from the sample fabcar.
I’m only interested in the getQueryResult
rich query feature in CouchDB.

Bellow you can access my repo with the two chaincodes setup and client apps to test the responses.

Besides the FabCar java chaincode there is a poc-services chaincode, and also a poc-services client app.
You can start the network and deploy both chaincodes by running 
` ./ fabcar` from the poc-services folder.
The chaincode is located in the chaincodes/poc-services folder as the fabcar one is.

The results differ by around 30 seconds.
FabCar                        - 3.5 seconds
My chaincode             - 31 seconds.

Can someone review and help me with this one, I don’t have any other ideas where the additional time difference could be sitting.

Best Regards,
Marek Malik


Od: <fabric@...> w imieniu użytkownika Marek Malik <info@...>
Data: piątek, 1 maja 2020 22:17
Do: Senthilnathan N <cendhu@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java


I didn’t tested placing the content in the root of the project, as usually the META-INF is placed in the app resource directory (as stated in the initial email).

Remarkably, this actually worked!
I assume that the process of setting up the couch db and any configuration/ doesn’t necessary have anything to do with the actual chain code deployment, it’s just packaged in the root with the code ?

Anyway, Thanks for your suggestion 😊

Best Regards,

Od: Senthilnathan N <cendhu@...>
Data: piątek, 1 maja 2020 19:32
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java






On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:

I'm not able to get the index to be created while deploying the chaincode on the peer. I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.

I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`
with the filename `pocServicesIdx.json` and content:

  "index": {
    "fields": [
  "ddoc": "pocServicesDoc",
  "name": "pocServicesIdx",
  "type": "json"


I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid.
The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Join to automatically receive all group messages.