Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-18449

Failed to create the state database index on the windows platform

    XMLWordPrintable

Details

    • Bug
    • Status: Unverified
    • Medium
    • Resolution: Unresolved
    • v2.3.0, v2.2.1, v2.2.2, v2.3.1
    • None
    • fabric-peer
    • (Please add steps to reproduce)

    Description

      The chaincode package contains the index file, and the path on the windows platform is `META-INF\statedb\couchdb\indexes`, but the separator used when obtaining the index information is '/'.

       

      // core/ledger/kvledger/txmgmt/privacyenabledstate/db.go
      
      func getIndexInfo(indexPath string) *indexInfo {
         indexInfo := &indexInfo{}
         dirsDepth := strings.Split(indexPath, "/")
         switch {
         case len(dirsDepth) > chaincodeIndexDirDepth &&
            dirsDepth[chaincodeIndexDirDepth] == "indexes":
            indexInfo.hasIndexForChaincode = true
         case len(dirsDepth) > collectionDirDepth &&
            dirsDepth[collectionDirDepth] == "collections" &&
            dirsDepth[collectionIndexDirDepth] == "indexes":
            indexInfo.hasIndexForCollection = true
            indexInfo.collectionName = dirsDepth[collectionNameDepth]
         }
         return indexInfo
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            felixrowe fei luo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: