Skip to content

Commit

Permalink
[FAB-2943] Event publishing failure fails block commit
Browse files Browse the repository at this point in the history
The committer implementation reports an error if the publishing
of a block committing event failures due to an error that is related
to the eventhub server.

The method shouldn't return a failure, but only log a message to the log,
because if it returns failure- the state transfer module in gossip/state/state.go
doesn't update its metadata.

Change-Id: I134874654f1ce1453eb30939fedfa2c86c2634da
Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Apr 10, 2017
1 parent 0640d43 commit 458bcdf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions core/committer/committer_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ limitations under the License.
package committer

import (
"fmt"

"github.com/hyperledger/fabric/core/committer/txvalidator"
"github.com/hyperledger/fabric/core/ledger"
"github.com/hyperledger/fabric/events/producer"
Expand Down Expand Up @@ -65,8 +63,7 @@ func (lc *LedgerCommitter) Commit(block *common.Block) error {

// send block event *after* the block has been committed
if err := producer.SendProducerBlockEvent(block); err != nil {
logger.Errorf("Error sending block event %s", err)
return fmt.Errorf("Error sending block event %s", err)
logger.Errorf("Error publishing block %d, because: %v", block.Header.Number, err)
}

return nil
Expand Down

0 comments on commit 458bcdf

Please sign in to comment.