Skip to content

Commit 458bcdf

Browse files
committed
[FAB-2943] Event publishing failure fails block commit
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>
1 parent 0640d43 commit 458bcdf

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

core/committer/committer_impl.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ limitations under the License.
1717
package committer
1818

1919
import (
20-
"fmt"
21-
2220
"github.com/hyperledger/fabric/core/committer/txvalidator"
2321
"github.com/hyperledger/fabric/core/ledger"
2422
"github.com/hyperledger/fabric/events/producer"
@@ -65,8 +63,7 @@ func (lc *LedgerCommitter) Commit(block *common.Block) error {
6563

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

7269
return nil

0 commit comments

Comments
 (0)