| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
https://github.com/apache/couchdb
Merged after r+ from rnewson on IRC, general trustworthiness of process.
|
| |
| |
| |
| |
| |
| |
| | |
A missing_stub exception is special in that the replicator retries the
request without the atts_since optimmization.
COUCHDB-1901
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The unlink at the end is a noop, so we can simplify this to use
spawn_link/3 and the fully-exported function call instead of
spawn_link/1 and a closure.
BugzID: 20822
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An automatic retry makes no sense here, as we've already streamed part
of the response body from the GET. Disabling the retries bubbles the
error up to run_user_fun inside open_doc_revs allows us to retry the
whole GET + PUT correctly.
BugzID: 20822
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch disables the httpc client retries for the request to stream
document revisions to the replicator. The retry logic at that level
could end up jumbling together response body data from different
requests and thoroughly confusing the multipart parser. Moving the
retry logic up a level allows us to start fresh each time.
BugzID: 21367
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An HTTP failure in the open_doc_revs can lead to a replication deadlock
if the retry happens while parsing the multipart/mime response. The
UserFun callback can end up attempting to PUT a request using an
attachment reader from the failed request while the pid that invoked
open_doc_revs will never see the started_open_doc_revs message which
indicates a retry has happened.
This just spawns a middleman process so that the process that invoked
open_doc_revs can listen for the response from the user function as well
as the started_open_doc_revs message to handle retries appropriately.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The multipart mime parsing code was getting into a state where it would
orphan parsers that held onto pool connections. This just adds a monitor
to make sure that the parser process dies when the parent dies normally
without finishing reading the rest of the parser.
BugzID: 16751
|
| |
| |
| |
| |
| |
| |
| | |
This allows the replicator to keep up with revisions that may have
occured after missing_revs was called.
BugzID: 14241
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
* 1888-fix-user-fields-disabled-for-admins:
admins can always read all doc fields, regardless of public_fields
|
| | |
| | |
| | |
| | | |
Closes COUCHDB-1888
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
* 1425-fix-graceful-surrogate-handling:
Handle invalid UTF-8 byte sequences gracefully by replacing them with 0xFFFD
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
CouchDB's Erlang JSON parser allows storing of invalid UTF-8 byte sequences.
The Query Server inside CouchDB fails upon encountering these byte sequences.
The view process fails for the current batch of document updates. The result
is that the view is invariably broken. Only removing the document in question
solves this otherwise, but finding that is hard as the `log()` inside the
Query Server dies with the invalid byte sequence because our protocol is
synchronous and map results an `log()` messages generated therein are
submitted together.
This patch replaces invalid bytes with the the surrogate chacracter 0xFFFD.
Closes COUCHDB-1425.
Patch by Sam Rijs <recv@awesan.de> and Paul Davis.
Eventually, this should be fixed at the HTTP level, so that no documents
with invalid byte sequences can be written to CouchDB. The jiffy encoder
we'll get with BigCouch will do that for us. This is a fix for the releases
until then.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|