You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CouchDB indexes are NOT supported on implicit organisation collections.
Expected
Support CouchDB indexes on implicit organisation collections (implicit_org) for faster query and data retrieval.
Solution
CouchDB indexes for _implicit_org_<MSPID> collections, which are not present in collectionConfigMap are skipped during handle chaincode deployment in peer.
I believe this check was added to avoid creation of database and index entries for collections which are not explicitly defined in collection-config but have an entry in chaincode indexes directory structure.
However indexing support for implicit collections can be easily provided by adding one more check like:
import"git.npci.org.in/vajra/hyperledger-fabric-sharding/core/chaincode/implicitcollection"_, ok:=collectionConfigMap[indexInfo.collectionName]
if!ok {
isImplicitCollection, mspId:=implicitcollection.MspIDIfImplicitCollection(indexInfo.collectionName)
// skip if the collection is not an implicit collection or collection mspId is different from peer mspIdif!isImplicitCollection||mspId!=s.localMspId {
logger.Errorf("Error processing index for chaincode [%s]: cannot create an index for an undefined collection=[%s]",
chaincodeDefinition.Name, indexInfo.collectionName)
continue
}
}
Please let me know if there was any other reason for not supporting indexes on implicit organisation collections.
(I could not find any reasons in previous discussions and original Jira issue is inaccessible).
Please let us know if you plan to work on this.
Yes!
The text was updated successfully, but these errors were encountered:
Current Status
CouchDB indexes are NOT supported on implicit organisation collections.
Expected
Support CouchDB indexes on implicit organisation collections (implicit_org) for faster query and data retrieval.
Solution
CouchDB indexes for
_implicit_org_<MSPID>
collections, which are not present incollectionConfigMap
are skipped during handle chaincode deployment in peer.I believe this check was added to avoid creation of database and index entries for collections which are not explicitly defined in collection-config but have an entry in chaincode indexes directory structure.
However indexing support for implicit collections can be easily provided by adding one more check like:
Please let me know if there was any other reason for not supporting indexes on implicit organisation collections.
(I could not find any reasons in previous discussions and original Jira issue is inaccessible).
Please let us know if you plan to work on this.
Yes!
The text was updated successfully, but these errors were encountered: