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

Inconsistencies in Log for "No Collection Config ... "

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide
      1. Create a 4 org network, assume peer 0 is anchor peer in each org.
      2. Create a channel with a private collection between org 1 and org 4
      3. Submit 200 private transactions between org 1 and org 4
      4. Take down peer 0 in org 1
      5. Submit 200 private transactions between org 1 and org 4
      6. Take down peer 1 in org 4
      7. Submit 200 private transactions between org 1 and org 4
      8. Take down peer 1 in org 1 and peer 0 in org 4. Bring up peer 0 in org 1 and peer 1 in org 4.
      9. You should see the error logged in peer 0 org 1
      Show
      1. Create a 4 org network, assume peer 0 is anchor peer in each org. 2. Create a channel with a private collection between org 1 and org 4 3. Submit 200 private transactions between org 1 and org 4 4. Take down peer 0 in org 1 5. Submit 200 private transactions between org 1 and org 4 6. Take down peer 1 in org 4 7. Submit 200 private transactions between org 1 and org 4 8. Take down peer 1 in org 1 and peer 0 in org 4. Bring up peer 0 in org 1 and peer 1 in org 4. 9. You should see the error logged in peer 0 org 1

      Description

      When we were running a test where peers were brought up and down randomly, we would see the following error off and on

      2019-11-07 19:57:12.140 UTC [gossip.privdata] fromTransientStore -> ERRO 6f2 No collection config was found for chaincode mycc collection name mycc txID

      Now this coupled with logs saying that a block was committed without made us very concerned that somehow we were losing private data.  After days of looking through the source code for the hlf peer and working to reproduce I was able to determine that in fact no private data had been lost and it was just the order in which things went down. However, I have some concerns with how the error is being logged

      1. The collection name is not being logged.

      In the fromTransientStore function of dataretriever.go we see

      if !found {
         logger.Error("No collection config was found for chaincode", dig.Namespace, "collection   name",
      dig.Namespace, "txID", dig.TxId)
         continue
      }

      What we see is that the dog.Namespace is getting reported for the collection name instead of dig.Collection

      2. Is Error really the correct level for this log? I feel it is more of a warning

      What I found is that this error occurs when you have an non-anchor peer that is far enough behind the ledger that it using the pull gossip protocol and it tries to pull blocks from an anchor peer that is even farther behind the ledger than the non-anchor peer.  The peers with the private data are either down or not able to be contacted by either peer.

      What happens is the anchor peer gets the request and it sees that the requested block is > than its current ledger height so it goes to check its transient store.  It doesn't have any of the transient data so it logs the error.  Once the peers with the private data come up again everything recovers and the error goes away. 

      I just wonder if it is really valid for this to be logged as an error when all it means is that the peer has never had the private data and not that it somehow lost it.

      3. Why is the transaction id null?

      This log is supposed to contain the transaction id that we are fetching the private data, however the log we got had no transaction id. We also get this log

      2019-11-07 19:57:12.140 UTC [transientstore] GetTxPvtRWSetByTxid -> DEBU 6f3 Getting private data from transient store for transaction

      Any ideas as to why there is no transaction id?

       

       

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            RyanMathison Ryan Mathison
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration