0

I have two organizations with 2 peers running on each organization. I created a channel and joined all the 4 peers to it. The peers use couchdb as state database. Now if I accidentally modify/delete the data stored in one of the peer's couchdb database, how does this peer recover from the changed state and get synchronized with other peers?

Bukks
  • 408
  • 7
  • 16

1 Answers1

2

If you modify data in the state database, it will not be propagated to other peers. See the detailed answer in the question: Hyperledger Fabric CouchDB updates through Fauxton treated as valid updates, but no record in blockchain

Dave Enyeart
  • 2,523
  • 14
  • 23
  • I went through your answer and there I found you mentioning "dropping the state database" to recover the state database from blockchain. Does that mean deleting the couchdb container the peer is using? – Bukks Feb 11 '19 at 04:21
  • 2
    @Bukks you can stop peer and delete the data in the CouchDB container's /opt/couchdb/data directory (many people mount this directory to the host, so you can also delete from the host). Upon peer restart, the state database will be rebuilt from the blockchain source of truth. – Dave Enyeart Feb 11 '19 at 12:44
  • Ok. I'll check that out. Thanks – Bukks Feb 12 '19 at 04:24