Replies: 3 comments
-
After an attachment uploaded, is the document in a "locked" status until attachment synchronized to other instances in the cluster? I find I may get response "202" instead of "201" if I continue uploding attachment to that document, and then, "GET document" is also blocked. |
Beta Was this translation helpful? Give feedback.
-
In our cluster we have another problem - after save document with attachments we request this doc with stubs and after save again(with "stub":true) we sometimes get a error "Invalid attachment stub". I think that attachments upload lazily and that's why after second save attachments not found. We get it only under heavy load. |
Beta Was this translation helpful? Give feedback.
-
@man4j It sounds reasonable that under heavy load the attachment was saved lazily (just like directly save attachment to a doc then get a 202 response). But my CouchDB instances are not busy at all, it cannot handle continuously uploading attachemnts to a document if in a cluster. Seems you did not have that issue, how did you config your vm.args and local.ini files? |
Beta Was this translation helpful? Give feedback.
-
Create a document, and then uploading attachment one by one, for a single CouchDB instance, there's no problem, but if CouchDB is in a cluster, uploading becomes more and more slow.
Description
I have 3 CouchDB 2.3.1 instances and join them into a cluster (q=8 n=3), they work properly, if I make changes to documens on one server, the other 2 will soon get the change.
Now I create a document, and have 3 or 4 attachments to upload, one by one (json, zip or tar, 2MB-70MB), if CouchDB is not in a cluster, all that goes well, the time spent only depends on the file size. But if I do this to a CouchDB which is in a cluster, I found that 1st attachment can be uploaded normally, then it took more time than expected to upload 2nd attachment, and much more for the 3rd -- sometimes I even get 202 instead of 201, then that document is not readable. Is it as expected or abnormal ?
Expected Behaviour
CouchDB should work as normal when in a cluster. Is it true that we get 201 response after all instances sync the change? But it still cannot explain why uploading become slower and slower.
Your Environment
Beta Was this translation helpful? Give feedback.
All reactions