CChyuan
CChyuan

Reputation: 93

Hyperledger Composer Fail to Update unless Peer is restarted

I am having trouble with Hyperledger composer. I am using jwt on a docker deployed composer rest server. At times when I try to update my data, despite the api returning me with a 200 ok, when I call GET to retrieve the newly updated info, the data remains unchanged. I could only temporary solve this by 'docker restart '. And after an unknown amount of time, the update will fail again and I have to restart the peer.

I a wondering what could be the problem.

Upvotes: 1

Views: 63

Answers (2)

Andrei Dragotoniu
Andrei Dragotoniu

Reputation: 6335

Every data update happens via a transaction.

For the data to be updated, the transaction must first be approved. The peer will issue a transaction proposal first which will then be subject to the endorsement policy that you setup when you created the channel.

This means there can be a delay before the transaction is accepted and committed, or the transaction might be rejected altogether meaning your data will not be updated.Even if the transaction does go on the ledger, you can't really know when this will happen.

I would start by checking the peer logs to see what's actually happening.

I would also check the bugs reported on your specific version of fabric to see if there are any known issue. You might want to ask in fabric rocket chat channel as well.

Upvotes: 0

david_k
david_k

Reputation: 5868

You don't give much detail, for example the environment you are running, the version of composer, fabric etc. So I am going to guess you are running composer 0.20 with fabric 1.2.0. There is a big problem in fabric 1.2.0 which meant that the blockchain and world state didn't get updated. You need to use fabric 1.2.1 which solves the issue.

Upvotes: 1

Related Questions