You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Joseph Heydorn (JIRA)" <ji...@apache.org> on 2012/07/05 22:19:34 UTC

[jira] [Created] (COUCHDB-1509) Document creation fails after deleting and replicating

Joseph Heydorn created COUCHDB-1509:
---------------------------------------

             Summary: Document creation fails after deleting and replicating
                 Key: COUCHDB-1509
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1509
             Project: CouchDB
          Issue Type: Bug
          Components: HTTP Interface
    Affects Versions: 1.2
         Environment: Windows 7 Enterprise. CouchDB 1.1 and 1.2
            Reporter: Joseph Heydorn


This is a bug which the team I work with found because we have a lot of unit tests which use CouchDB. 

To reproduce it, do the following:
1) Create a document in a database.
2) Delete that document.
3) Replicate that database to a second database.
4) Create that same document in the second database. Although CouchDB returns "ok":true, the document is not created (this is the bug).
5) Do step 4 again and the document is created.

The following is my output from cmd.exe when I did the above steps using curl:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\jeheydor\Desktop>set couch=http://localhost:5984

C:\Users\jeheydor\Desktop>curl -X GET %couch%
{"couchdb":"Welcome","version":"1.2.0"}

C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db
{"ok":true}

C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db-replica
{"ok":true}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/db -d "@test-doc.json" -H "Conten
t-Type: application/json"
{"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}

C:\Users\jeheydor\Desktop>curl -X DELETE %couch%/db/1?rev="1-a422bdfbb43a534656f
6c14b210ac65b"
{"ok":true,"id":"1","rev":"2-d015c0459177c2f893cc691f9144ca5e"}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/_replicate -d "@replicate.json" -
H "Content-Type: application/json"
{"ok":true,"session_id":"59177fe2deb3464f5cb195bf017c5c31","source_last_seq":2,"
replication_id_version":2,"history":[{"session_id":"59177fe2deb3464f5cb195bf017c
5c31","start_time":"Thu, 05 Jul 2012 19:54:42 GMT","end_time":"Thu, 05 Jul 2012
19:54:42 GMT","start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_chec
ked":1,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]
}

C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
{"error":"not_found","reason":"deleted"}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
 "Content-Type: application/json"
{"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}

C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
{"error":"not_found","reason":"deleted"}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
 "Content-Type: application/json"
{"ok":true,"id":"1","rev":"3-176a1441a6fc8582ffff3c3abb12e13b"}

C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
{"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
:0}

--
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-1509) Document creation fails after deleting and replicating

Posted by "Joseph Heydorn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407462#comment-13407462 ] 

Joseph Heydorn commented on COUCHDB-1509:
-----------------------------------------

I forgot to mention what was in those files I uploaded using curl.

test-doc.json:
{"_id":"1", "name":"test-doc", "count":0}

replicate.json:
{"source":"db", "target":"db-replica"}
                
> Document creation fails after deleting and replicating
> ------------------------------------------------------
>
>                 Key: COUCHDB-1509
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1509
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.2
>         Environment: Windows 7 Enterprise. CouchDB 1.1 and 1.2
>            Reporter: Joseph Heydorn
>
> This is a bug which the team I work with found because we have a lot of unit tests which use CouchDB. 
> To reproduce it, do the following:
> 1) Create a document in a database.
> 2) Delete that document.
> 3) Replicate that database to a second database.
> 4) Create that same document in the second database. Although CouchDB returns "ok":true, the document is not created (this is the bug).
> 5) Do step 4 again and the document is created.
> The following is my output from cmd.exe when I did the above steps using curl:
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> C:\Users\jeheydor\Desktop>set couch=http://localhost:5984
> C:\Users\jeheydor\Desktop>curl -X GET %couch%
> {"couchdb":"Welcome","version":"1.2.0"}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db-replica
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db -d "@test-doc.json" -H "Conten
> t-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X DELETE %couch%/db/1?rev="1-a422bdfbb43a534656f
> 6c14b210ac65b"
> {"ok":true,"id":"1","rev":"2-d015c0459177c2f893cc691f9144ca5e"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/_replicate -d "@replicate.json" -
> H "Content-Type: application/json"
> {"ok":true,"session_id":"59177fe2deb3464f5cb195bf017c5c31","source_last_seq":2,"
> replication_id_version":2,"history":[{"session_id":"59177fe2deb3464f5cb195bf017c
> 5c31","start_time":"Thu, 05 Jul 2012 19:54:42 GMT","end_time":"Thu, 05 Jul 2012
> 19:54:42 GMT","start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_chec
> ked":1,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]
> }
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"3-176a1441a6fc8582ffff3c3abb12e13b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
> :0}

--
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] [Updated] (COUCHDB-1509) Document creation fails after deleting and replicating

Posted by "Joseph Heydorn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joseph Heydorn updated COUCHDB-1509:
------------------------------------

    Comment: was deleted

(was: I forgot to mention what was in those files I uploaded using curl.

test-doc.json:
{"_id":"1", "name":"test-doc", "count":0}

replicate.json:
{"source":"db", "target":"db-replica"})
    
> Document creation fails after deleting and replicating
> ------------------------------------------------------
>
>                 Key: COUCHDB-1509
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1509
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.2
>         Environment: Windows 7 Enterprise. CouchDB 1.1 and 1.2
>            Reporter: Joseph Heydorn
>
> This is a bug which the team I work with found because we have a lot of unit tests which use CouchDB. 
> To reproduce it, do the following:
> 1) Create a document in a database.
> 2) Delete that document.
> 3) Replicate that database to a second database.
> 4) Create that same document in the second database. Although CouchDB returns "ok":true, the document is not created (this is the bug).
> 5) Do step 4 again and the document is created.
> The following is my output from cmd.exe when I did the above steps using curl:
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> C:\Users\jeheydor\Desktop>set couch=http://localhost:5984
> C:\Users\jeheydor\Desktop>curl -X GET %couch%
> {"couchdb":"Welcome","version":"1.2.0"}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db-replica
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db -d "@test-doc.json" -H "Conten
> t-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X DELETE %couch%/db/1?rev="1-a422bdfbb43a534656f
> 6c14b210ac65b"
> {"ok":true,"id":"1","rev":"2-d015c0459177c2f893cc691f9144ca5e"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/_replicate -d "@replicate.json" -
> H "Content-Type: application/json"
> {"ok":true,"session_id":"59177fe2deb3464f5cb195bf017c5c31","source_last_seq":2,"
> replication_id_version":2,"history":[{"session_id":"59177fe2deb3464f5cb195bf017c
> 5c31","start_time":"Thu, 05 Jul 2012 19:54:42 GMT","end_time":"Thu, 05 Jul 2012
> 19:54:42 GMT","start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_chec
> ked":1,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]
> }
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"3-176a1441a6fc8582ffff3c3abb12e13b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
> :0}
> Here are the contents of the two files I uploaded using curl -d:
> test-doc.json:
> {"_id":"1", "name":"test-doc", "count":0}
> replicate.json:
> {"source":"db", "target":"db-replica"} 

--
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-1509) Document creation fails after deleting and replicating

Posted by "Joseph Heydorn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408078#comment-13408078 ] 

Joseph Heydorn commented on COUCHDB-1509:
-----------------------------------------

I put all the curl commands in a batch script, then added ?meta=true to the last GET command. Here is the response it gave me:

{"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
:0,"_revs_info":[{"rev":"3-176a1441a6fc8582ffff3c3abb12e13b","status":"available
"},{"rev":"2-d015c0459177c2f893cc691f9144ca5e","status":"deleted"},{"rev":"1-a42
2bdfbb43a534656f6c14b210ac65b","status":"available"}]}

I also deleted the both databases (db and db-replica) before the other curl commands to make sure there were no old revisions causing trouble. 
                
> Document creation fails after deleting and replicating
> ------------------------------------------------------
>
>                 Key: COUCHDB-1509
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1509
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.2
>         Environment: Windows 7 Enterprise. CouchDB 1.1 and 1.2
>            Reporter: Joseph Heydorn
>
> This is a bug which the team I work with found because we have a lot of unit tests which use CouchDB. 
> To reproduce it, do the following:
> 1) Create a document in a database.
> 2) Delete that document.
> 3) Replicate that database to a second database.
> 4) Create that same document in the second database. Although CouchDB returns "ok":true, the document is not created (this is the bug).
> 5) Do step 4 again and the document is created.
> The following is my output from cmd.exe when I did the above steps using curl:
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> C:\Users\jeheydor\Desktop>set couch=http://localhost:5984
> C:\Users\jeheydor\Desktop>curl -X GET %couch%
> {"couchdb":"Welcome","version":"1.2.0"}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db-replica
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db -d "@test-doc.json" -H "Conten
> t-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X DELETE %couch%/db/1?rev="1-a422bdfbb43a534656f
> 6c14b210ac65b"
> {"ok":true,"id":"1","rev":"2-d015c0459177c2f893cc691f9144ca5e"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/_replicate -d "@replicate.json" -
> H "Content-Type: application/json"
> {"ok":true,"session_id":"59177fe2deb3464f5cb195bf017c5c31","source_last_seq":2,"
> replication_id_version":2,"history":[{"session_id":"59177fe2deb3464f5cb195bf017c
> 5c31","start_time":"Thu, 05 Jul 2012 19:54:42 GMT","end_time":"Thu, 05 Jul 2012
> 19:54:42 GMT","start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_chec
> ked":1,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]
> }
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"3-176a1441a6fc8582ffff3c3abb12e13b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
> :0}
> Here are the contents of the two files I uploaded using curl -d:
> test-doc.json:
> {"_id":"1", "name":"test-doc", "count":0}
> replicate.json:
> {"source":"db", "target":"db-replica"} 

--
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] [Updated] (COUCHDB-1509) Document creation fails after deleting and replicating

Posted by "Joseph Heydorn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joseph Heydorn updated COUCHDB-1509:
------------------------------------

    Description: 
This is a bug which the team I work with found because we have a lot of unit tests which use CouchDB. 

To reproduce it, do the following:
1) Create a document in a database.
2) Delete that document.
3) Replicate that database to a second database.
4) Create that same document in the second database. Although CouchDB returns "ok":true, the document is not created (this is the bug).
5) Do step 4 again and the document is created.

The following is my output from cmd.exe when I did the above steps using curl:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\jeheydor\Desktop>set couch=http://localhost:5984

C:\Users\jeheydor\Desktop>curl -X GET %couch%
{"couchdb":"Welcome","version":"1.2.0"}

C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db
{"ok":true}

C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db-replica
{"ok":true}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/db -d "@test-doc.json" -H "Conten
t-Type: application/json"
{"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}

C:\Users\jeheydor\Desktop>curl -X DELETE %couch%/db/1?rev="1-a422bdfbb43a534656f
6c14b210ac65b"
{"ok":true,"id":"1","rev":"2-d015c0459177c2f893cc691f9144ca5e"}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/_replicate -d "@replicate.json" -
H "Content-Type: application/json"
{"ok":true,"session_id":"59177fe2deb3464f5cb195bf017c5c31","source_last_seq":2,"
replication_id_version":2,"history":[{"session_id":"59177fe2deb3464f5cb195bf017c
5c31","start_time":"Thu, 05 Jul 2012 19:54:42 GMT","end_time":"Thu, 05 Jul 2012
19:54:42 GMT","start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_chec
ked":1,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]
}

C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
{"error":"not_found","reason":"deleted"}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
 "Content-Type: application/json"
{"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}

C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
{"error":"not_found","reason":"deleted"}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
 "Content-Type: application/json"
{"ok":true,"id":"1","rev":"3-176a1441a6fc8582ffff3c3abb12e13b"}

C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
{"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
:0}

Here are the contents of the two files I uploaded using curl -d:

test-doc.json:
{"_id":"1", "name":"test-doc", "count":0}

replicate.json:
{"source":"db", "target":"db-replica"} 

  was:
This is a bug which the team I work with found because we have a lot of unit tests which use CouchDB. 

To reproduce it, do the following:
1) Create a document in a database.
2) Delete that document.
3) Replicate that database to a second database.
4) Create that same document in the second database. Although CouchDB returns "ok":true, the document is not created (this is the bug).
5) Do step 4 again and the document is created.

The following is my output from cmd.exe when I did the above steps using curl:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\jeheydor\Desktop>set couch=http://localhost:5984

C:\Users\jeheydor\Desktop>curl -X GET %couch%
{"couchdb":"Welcome","version":"1.2.0"}

C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db
{"ok":true}

C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db-replica
{"ok":true}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/db -d "@test-doc.json" -H "Conten
t-Type: application/json"
{"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}

C:\Users\jeheydor\Desktop>curl -X DELETE %couch%/db/1?rev="1-a422bdfbb43a534656f
6c14b210ac65b"
{"ok":true,"id":"1","rev":"2-d015c0459177c2f893cc691f9144ca5e"}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/_replicate -d "@replicate.json" -
H "Content-Type: application/json"
{"ok":true,"session_id":"59177fe2deb3464f5cb195bf017c5c31","source_last_seq":2,"
replication_id_version":2,"history":[{"session_id":"59177fe2deb3464f5cb195bf017c
5c31","start_time":"Thu, 05 Jul 2012 19:54:42 GMT","end_time":"Thu, 05 Jul 2012
19:54:42 GMT","start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_chec
ked":1,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]
}

C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
{"error":"not_found","reason":"deleted"}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
 "Content-Type: application/json"
{"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}

C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
{"error":"not_found","reason":"deleted"}

C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
 "Content-Type: application/json"
{"ok":true,"id":"1","rev":"3-176a1441a6fc8582ffff3c3abb12e13b"}

C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
{"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
:0}

    
> Document creation fails after deleting and replicating
> ------------------------------------------------------
>
>                 Key: COUCHDB-1509
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1509
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.2
>         Environment: Windows 7 Enterprise. CouchDB 1.1 and 1.2
>            Reporter: Joseph Heydorn
>
> This is a bug which the team I work with found because we have a lot of unit tests which use CouchDB. 
> To reproduce it, do the following:
> 1) Create a document in a database.
> 2) Delete that document.
> 3) Replicate that database to a second database.
> 4) Create that same document in the second database. Although CouchDB returns "ok":true, the document is not created (this is the bug).
> 5) Do step 4 again and the document is created.
> The following is my output from cmd.exe when I did the above steps using curl:
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> C:\Users\jeheydor\Desktop>set couch=http://localhost:5984
> C:\Users\jeheydor\Desktop>curl -X GET %couch%
> {"couchdb":"Welcome","version":"1.2.0"}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db-replica
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db -d "@test-doc.json" -H "Conten
> t-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X DELETE %couch%/db/1?rev="1-a422bdfbb43a534656f
> 6c14b210ac65b"
> {"ok":true,"id":"1","rev":"2-d015c0459177c2f893cc691f9144ca5e"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/_replicate -d "@replicate.json" -
> H "Content-Type: application/json"
> {"ok":true,"session_id":"59177fe2deb3464f5cb195bf017c5c31","source_last_seq":2,"
> replication_id_version":2,"history":[{"session_id":"59177fe2deb3464f5cb195bf017c
> 5c31","start_time":"Thu, 05 Jul 2012 19:54:42 GMT","end_time":"Thu, 05 Jul 2012
> 19:54:42 GMT","start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_chec
> ked":1,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]
> }
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"3-176a1441a6fc8582ffff3c3abb12e13b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
> :0}
> Here are the contents of the two files I uploaded using curl -d:
> test-doc.json:
> {"_id":"1", "name":"test-doc", "count":0}
> replicate.json:
> {"source":"db", "target":"db-replica"} 

--
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-1509) Document creation fails after deleting and replicating

Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Newson resolved COUCHDB-1509.
------------------------------------

    Resolution: Duplicate

Duplicate of COUCHDB-1415
                
> Document creation fails after deleting and replicating
> ------------------------------------------------------
>
>                 Key: COUCHDB-1509
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1509
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.2
>         Environment: Windows 7 Enterprise. CouchDB 1.1 and 1.2
>            Reporter: Joseph Heydorn
>
> This is a bug which the team I work with found because we have a lot of unit tests which use CouchDB. 
> To reproduce it, do the following:
> 1) Create a document in a database.
> 2) Delete that document.
> 3) Replicate that database to a second database.
> 4) Create that same document in the second database. Although CouchDB returns "ok":true, the document is not created (this is the bug).
> 5) Do step 4 again and the document is created.
> The following is my output from cmd.exe when I did the above steps using curl:
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> C:\Users\jeheydor\Desktop>set couch=http://localhost:5984
> C:\Users\jeheydor\Desktop>curl -X GET %couch%
> {"couchdb":"Welcome","version":"1.2.0"}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db-replica
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db -d "@test-doc.json" -H "Conten
> t-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X DELETE %couch%/db/1?rev="1-a422bdfbb43a534656f
> 6c14b210ac65b"
> {"ok":true,"id":"1","rev":"2-d015c0459177c2f893cc691f9144ca5e"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/_replicate -d "@replicate.json" -
> H "Content-Type: application/json"
> {"ok":true,"session_id":"59177fe2deb3464f5cb195bf017c5c31","source_last_seq":2,"
> replication_id_version":2,"history":[{"session_id":"59177fe2deb3464f5cb195bf017c
> 5c31","start_time":"Thu, 05 Jul 2012 19:54:42 GMT","end_time":"Thu, 05 Jul 2012
> 19:54:42 GMT","start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_chec
> ked":1,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]
> }
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"3-176a1441a6fc8582ffff3c3abb12e13b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
> :0}
> Here are the contents of the two files I uploaded using curl -d:
> test-doc.json:
> {"_id":"1", "name":"test-doc", "count":0}
> replicate.json:
> {"source":"db", "target":"db-replica"} 

--
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-1509) Document creation fails after deleting and replicating

Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407534#comment-13407534 ] 

Robert Newson commented on COUCHDB-1509:
----------------------------------------

Maybe, but I'm thinking deleted_conflicts. No time to investigate right now, but interested in a GET /dbname/docid?meta=true output.

                
> Document creation fails after deleting and replicating
> ------------------------------------------------------
>
>                 Key: COUCHDB-1509
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1509
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.2
>         Environment: Windows 7 Enterprise. CouchDB 1.1 and 1.2
>            Reporter: Joseph Heydorn
>
> This is a bug which the team I work with found because we have a lot of unit tests which use CouchDB. 
> To reproduce it, do the following:
> 1) Create a document in a database.
> 2) Delete that document.
> 3) Replicate that database to a second database.
> 4) Create that same document in the second database. Although CouchDB returns "ok":true, the document is not created (this is the bug).
> 5) Do step 4 again and the document is created.
> The following is my output from cmd.exe when I did the above steps using curl:
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> C:\Users\jeheydor\Desktop>set couch=http://localhost:5984
> C:\Users\jeheydor\Desktop>curl -X GET %couch%
> {"couchdb":"Welcome","version":"1.2.0"}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db-replica
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db -d "@test-doc.json" -H "Conten
> t-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X DELETE %couch%/db/1?rev="1-a422bdfbb43a534656f
> 6c14b210ac65b"
> {"ok":true,"id":"1","rev":"2-d015c0459177c2f893cc691f9144ca5e"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/_replicate -d "@replicate.json" -
> H "Content-Type: application/json"
> {"ok":true,"session_id":"59177fe2deb3464f5cb195bf017c5c31","source_last_seq":2,"
> replication_id_version":2,"history":[{"session_id":"59177fe2deb3464f5cb195bf017c
> 5c31","start_time":"Thu, 05 Jul 2012 19:54:42 GMT","end_time":"Thu, 05 Jul 2012
> 19:54:42 GMT","start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_chec
> ked":1,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]
> }
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"3-176a1441a6fc8582ffff3c3abb12e13b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
> :0}
> Here are the contents of the two files I uploaded using curl -d:
> test-doc.json:
> {"_id":"1", "name":"test-doc", "count":0}
> replicate.json:
> {"source":"db", "target":"db-replica"} 

--
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-1509) Document creation fails after deleting and replicating

Posted by "Dave Cottlehuber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407533#comment-13407533 ] 

Dave Cottlehuber commented on COUCHDB-1509:
-------------------------------------------

I'm out this week, but this is likely a duplicate of COUCHDB-1415. Can anybody confirm that?
                
> Document creation fails after deleting and replicating
> ------------------------------------------------------
>
>                 Key: COUCHDB-1509
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1509
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.2
>         Environment: Windows 7 Enterprise. CouchDB 1.1 and 1.2
>            Reporter: Joseph Heydorn
>
> This is a bug which the team I work with found because we have a lot of unit tests which use CouchDB. 
> To reproduce it, do the following:
> 1) Create a document in a database.
> 2) Delete that document.
> 3) Replicate that database to a second database.
> 4) Create that same document in the second database. Although CouchDB returns "ok":true, the document is not created (this is the bug).
> 5) Do step 4 again and the document is created.
> The following is my output from cmd.exe when I did the above steps using curl:
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> C:\Users\jeheydor\Desktop>set couch=http://localhost:5984
> C:\Users\jeheydor\Desktop>curl -X GET %couch%
> {"couchdb":"Welcome","version":"1.2.0"}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X PUT %couch%/db-replica
> {"ok":true}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db -d "@test-doc.json" -H "Conten
> t-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X DELETE %couch%/db/1?rev="1-a422bdfbb43a534656f
> 6c14b210ac65b"
> {"ok":true,"id":"1","rev":"2-d015c0459177c2f893cc691f9144ca5e"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/_replicate -d "@replicate.json" -
> H "Content-Type: application/json"
> {"ok":true,"session_id":"59177fe2deb3464f5cb195bf017c5c31","source_last_seq":2,"
> replication_id_version":2,"history":[{"session_id":"59177fe2deb3464f5cb195bf017c
> 5c31","start_time":"Thu, 05 Jul 2012 19:54:42 GMT","end_time":"Thu, 05 Jul 2012
> 19:54:42 GMT","start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_chec
> ked":1,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]
> }
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"1-a422bdfbb43a534656f6c14b210ac65b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"error":"not_found","reason":"deleted"}
> C:\Users\jeheydor\Desktop>curl -X POST %couch%/db-replica -d "@test-doc.json" -H
>  "Content-Type: application/json"
> {"ok":true,"id":"1","rev":"3-176a1441a6fc8582ffff3c3abb12e13b"}
> C:\Users\jeheydor\Desktop>curl -X GET %couch%/db-replica/1
> {"_id":"1","_rev":"3-176a1441a6fc8582ffff3c3abb12e13b","name":"test-doc","count"
> :0}
> Here are the contents of the two files I uploaded using curl -d:
> test-doc.json:
> {"_id":"1", "name":"test-doc", "count":0}
> replicate.json:
> {"source":"db", "target":"db-replica"} 

--
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