微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在超时崩溃的大查询/更新后,Fabric 无法恢复对等点

如何解决在超时崩溃的大查询/更新后,Fabric 无法恢复对等点

我有一个带有 2 个对等点的 hyperledger fabric V1.4 集群,几天前我上传了大量寄存器约 300 万个文档,并且在我尝试在链代码中运行一个函数查询大量寄存器并基于结果保存了一些新的寄存器。

发生了什么我的区块链崩溃了,通常这不是问题,因为我在 k8s 集群中拥有它,对等方只是重新启动,但在崩溃后,我的对等方都无法恢复。

与提到的 here 一样与 couchDB 同步似乎有问题,但我的系统即使在重新启动整个集群后也无法恢复正常运行,每次超时错误再次发生。>

当时我也在测试 CORE_CHAINCODE_EXECUTETIMEOUT 变量,试图允许更大的查询,我不确定这是否可能是问题所在,但将其改回 30 秒并没有解决问题,并将其扩展到 1200 秒也没有没有帮助解决问题。

这些是沙发数据库的日志:

[notice] 2021-05-18T17:11:41.663321Z nonode@nohost <0.25025.25> 6d1f83ed0e localhost:5984 127.0.0.1 admin POST /channel2_contract/_all_docs?include_docs=true 200 ok 32036
[error] 2021-05-18T17:11:44.598717Z nonode@nohost <0.24710.25> acf1283a50 req_err(1125717067) unkNown_error : normal
    [<<"chttpd:catch_error/3 L356">>,<<"chttpd:handle_req_after_auth/2 L322">>,<<"chttpd:process_request/1 L303">>,<<"chttpd:handle_request_int/1 L243">>,<<"mochiweb_http:headers/6 L128">>,<<"proc_lib:init_p_do_apply/3 L247">>]
[error] 2021-05-18T17:11:44.601107Z nonode@nohost <0.24407.25> 51b4f008c0 req_err(1125717067) unkNown_error : normal
    [<<"chttpd:catch_error/3 L356">>,<<"proc_lib:init_p_do_apply/3 L247">>]

这些是对等方的日志:

2021-05-18 17:19:11.400 UTC [gossip.privdata] StoreBlock -> INFO 049 [channel2] Received block [32458] from buffer
2021-05-18 17:19:11.876 UTC [committer.txvalidator] Validate -> INFO 04a [channel2] Validated block [32458] in 476ms
2021-05-18 17:19:47.406 UTC [gossip.state] commitBlock -> ERRO 04b Got error while committing(context deadline exceeded (Client.Timeout or context cancellation while reading body)
error reading response body
github.com/hyperledger/fabric/core/ledger/util/couchdb.(*CouchDatabase).BatchRetrieveDocumentMetadata
        /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/util/couchdb/couchdb.go:1486
github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*subNsMetadataRetriever).execute
        /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/Metadata_retrieval.go:92
github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.executeBatches.func1
        /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/batch_util.go:37
runtime.goexit

couchDB 可以在没有 peer 的情况下运行,只有 peer 崩溃

我们最终创建了一个全新的区块链,因为这发生在开发环境中,但我们担心如果在生产中复制类似的东西会发生什么,我们真的不知道问题是什么以及下次要避免什么.

所以我还有旧的集群,有没有办法让它工作?出了什么问题?是磁盘缓存还是速度?是系统中的注册数量?或者不建议使用多个更新进行大查询?是 CORE_CHAINCODE_EXECUTETIMEOUT 变量的变化吗?

谢谢

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。