You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Vladimir Petrukhin (Created) (JIRA)" <ji...@apache.org> on 2012/03/16 13:31:39 UTC
[jira] [Created] (COUCHDB-1443) Duplicate documents on concurrent
insert
Duplicate documents on concurrent insert
----------------------------------------
Key: COUCHDB-1443
URL: https://issues.apache.org/jira/browse/COUCHDB-1443
Project: CouchDB
Issue Type: Bug
Components: Database Core
Affects Versions: 1.1.1
Reporter: Vladimir Petrukhin
I started 15000 parallel connections to CouchDb and writing 1 doc per connection. I expected 15000 docs in CouchDb. But I get 15008 or 15014 or etc.
I found that docs has different ids, but same content and revision.
I use simple POST method to insert the docs. Not in batch mode.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1443) Duplicate documents on concurrent
insert
Posted by "Vladimir Petrukhin (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231131#comment-13231131 ]
Vladimir Petrukhin commented on COUCHDB-1443:
---------------------------------------------
And my local computer has no proxy beetwen couchdb and application.
> Duplicate documents on concurrent insert
> ----------------------------------------
>
> Key: COUCHDB-1443
> URL: https://issues.apache.org/jira/browse/COUCHDB-1443
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 1.1.1
> Reporter: Vladimir Petrukhin
>
> I started 15000 parallel connections to CouchDb and writing 1 doc per connection. I expected 15000 docs in CouchDb. But I get 15008 or 15014 or etc.
> I found that docs has different ids, but same content and revision.
> I use simple POST method to insert the docs. Not in batch mode.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1443) Duplicate documents on concurrent
insert
Posted by "Bob Dionne (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232549#comment-13232549 ]
Bob Dionne commented on COUCHDB-1443:
-------------------------------------
I'm not able to reproduce this on the MBA, though I couldn't get up to 15000 connections. The fact that you se 412s when you use PUTs would point to the client, unless there's a mochiweb problem.
> Duplicate documents on concurrent insert
> ----------------------------------------
>
> Key: COUCHDB-1443
> URL: https://issues.apache.org/jira/browse/COUCHDB-1443
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 1.1.1
> Reporter: Vladimir Petrukhin
>
> I started 15000 parallel connections to CouchDb and writing 1 doc per connection. I expected 15000 docs in CouchDb. But I get 15008 or 15014 or etc.
> I found that docs has different ids, but same content and revision.
> I use simple POST method to insert the docs. Not in batch mode.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (COUCHDB-1443) Duplicate documents on concurrent
insert
Posted by "Vladimir Petrukhin (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Petrukhin resolved COUCHDB-1443.
-----------------------------------------
Resolution: Invalid
Ok. I test it with 15000 concurrent connections with raw sockets implementations. And all is ok. Bug in my http client.
> Duplicate documents on concurrent insert
> ----------------------------------------
>
> Key: COUCHDB-1443
> URL: https://issues.apache.org/jira/browse/COUCHDB-1443
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 1.1.1
> Reporter: Vladimir Petrukhin
>
> I started 15000 parallel connections to CouchDb and writing 1 doc per connection. I expected 15000 docs in CouchDb. But I get 15008 or 15014 or etc.
> I found that docs has different ids, but same content and revision.
> I use simple POST method to insert the docs. Not in batch mode.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1443) Duplicate documents on concurrent
insert
Posted by "Alexander Shorin (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231111#comment-13231111 ]
Alexander Shorin commented on COUCHDB-1443:
-------------------------------------------
"It is recommended that you avoid POST when possible, because proxies and other network intermediaries will occasionally resend POST requests, which can result in duplicate document creation." via http://wiki.apache.org/couchdb/HTTP_Document_API#POST
> Duplicate documents on concurrent insert
> ----------------------------------------
>
> Key: COUCHDB-1443
> URL: https://issues.apache.org/jira/browse/COUCHDB-1443
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 1.1.1
> Reporter: Vladimir Petrukhin
>
> I started 15000 parallel connections to CouchDb and writing 1 doc per connection. I expected 15000 docs in CouchDb. But I get 15008 or 15014 or etc.
> I found that docs has different ids, but same content and revision.
> I use simple POST method to insert the docs. Not in batch mode.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1443) Duplicate documents on concurrent
insert
Posted by "Vladimir Petrukhin (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231120#comment-13231120 ]
Vladimir Petrukhin commented on COUCHDB-1443:
---------------------------------------------
If i use "PUT" and generate ID by himself I get {"error":"conflict","reason":"Document update conflict."}
It's impossible because I use single thread and many async sockets:
for (int docId = 0; docId < 15000; docId++) {
db.async().put(docId, new Doc());
}
> Duplicate documents on concurrent insert
> ----------------------------------------
>
> Key: COUCHDB-1443
> URL: https://issues.apache.org/jira/browse/COUCHDB-1443
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 1.1.1
> Reporter: Vladimir Petrukhin
>
> I started 15000 parallel connections to CouchDb and writing 1 doc per connection. I expected 15000 docs in CouchDb. But I get 15008 or 15014 or etc.
> I found that docs has different ids, but same content and revision.
> I use simple POST method to insert the docs. Not in batch mode.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1443) Duplicate documents on concurrent
insert
Posted by "Bob Dionne (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231173#comment-13231173 ]
Bob Dionne commented on COUCHDB-1443:
-------------------------------------
interesting, I'll take a look at it this weekend.
> Duplicate documents on concurrent insert
> ----------------------------------------
>
> Key: COUCHDB-1443
> URL: https://issues.apache.org/jira/browse/COUCHDB-1443
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 1.1.1
> Reporter: Vladimir Petrukhin
>
> I started 15000 parallel connections to CouchDb and writing 1 doc per connection. I expected 15000 docs in CouchDb. But I get 15008 or 15014 or etc.
> I found that docs has different ids, but same content and revision.
> I use simple POST method to insert the docs. Not in batch mode.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1443) Duplicate documents on concurrent
insert
Posted by "Vladimir Petrukhin (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231132#comment-13231132 ]
Vladimir Petrukhin commented on COUCHDB-1443:
---------------------------------------------
If PUT or POST 100 or 200 docs - all ok. Problem exists when to many connections.
> Duplicate documents on concurrent insert
> ----------------------------------------
>
> Key: COUCHDB-1443
> URL: https://issues.apache.org/jira/browse/COUCHDB-1443
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 1.1.1
> Reporter: Vladimir Petrukhin
>
> I started 15000 parallel connections to CouchDb and writing 1 doc per connection. I expected 15000 docs in CouchDb. But I get 15008 or 15014 or etc.
> I found that docs has different ids, but same content and revision.
> I use simple POST method to insert the docs. Not in batch mode.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira