douhezi2285 2016-11-22 15:29
浏览 97

couchdb修订号跳转和文档更改导致冲突

I'm encountering a weird problem with couchDB. Some documents in my database can't be updated due to unknown conflicts. When comparing them to other documents in Futon I don't see any big differences to other documents. When I try to update one of those documents the revision number jumps from e.g. 45 to 58 but no changes are visible. This is what I see in the couchdb log file..

[Tue, 22 Nov 2016 13:45:10 GMT] [debug] [<0.30579.229>] Minor error in HTTP request: conflict
[Tue, 22 Nov 2016 13:45:10 GMT] [debug] [<0.30579.229>] Stacktrace: [{couch_db,update_doc,4,
                                  [{file,"couch_db.erl"},{line,432}]},
                                 {couch_httpd_db,update_doc,6,
                                  [{file,"couch_httpd_db.erl"},
                                   {line,753}]},
                                 {couch_httpd_db,do_db_req,2,
                                  [{file,"couch_httpd_db.erl"},
                                   {line,234}]},
                                 {couch_httpd,handle_request_int,5,
                                  [{file,"couch_httpd.erl"},{line,318}]},
                                 {mochiweb_http,headers,5,
                                  [{file,"mochiweb_http.erl"},{line,94}]},
                                 {proc_lib,init_p_do_apply,3,
                                  [{file,"proc_lib.erl"},{line,239}]}]
[Tue, 22 Nov 2016 13:45:10 GMT] [info] [<0.30579.229>] 127.0.0.1 - - PUT /DBNAME/external_link-35174841-41a5-44e3-a567-ec56209dc8b8-de_DE-1 409
[Tue, 22 Nov 2016 13:45:10 GMT] [debug] [<0.30579.229>] httpd 409 error response:
{"error":"conflict","reason":"Document update conflict."}

Any ideas what's going on here?

  • 写回答

1条回答 默认 最新

  • dongpou1935 2016-11-29 15:41
    关注

    The docs say that conflicts can occur when several threads or programs try to update a document at the same time.

    Are you sure you don't have another thread writing in your database, maybe a mapreduce? That would explain the different revision numbers.

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度