<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/couchdb.git/src/couch_replicator/test, branch devnode-boot-script</title>
<subtitle>github.com: apache/couchdb.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/'/>
<entry>
<title>Add missing default headers to responses (#3279)</title>
<updated>2020-11-23T10:45:39+00:00</updated>
<author>
<name>Bessenyei Balázs Donát</name>
<email>bessbd@users.noreply.github.com</email>
</author>
<published>2020-11-23T10:45:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=c362b1c11326050e09fd2ad5303e1221b38e8b0c'/>
<id>c362b1c11326050e09fd2ad5303e1221b38e8b0c</id>
<content type='text'>
Add missing default headers to responses
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add missing default headers to responses
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix error reporting when fetching replication filters</title>
<updated>2020-09-30T20:55:20+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-09-30T19:49:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=eaf13d35338fa4eecf660879c0b469c1db850a5b'/>
<id>eaf13d35338fa4eecf660879c0b469c1db850a5b</id>
<content type='text'>
Don't unnecessarily unwrap the fetch error since `error_info/1` can already
handle the current shape. Also, make sure to translate the reason to binary for
consistency with the other filter fetching errors in the
`couch_replicator_filters` module.

Add a test to ensure we return the `filter_fetch_error` term as that is
explicitly turned into a 404 error in chttpd, so we try to maintain
compatibility with CouchDB &lt;= 3.x code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't unnecessarily unwrap the fetch error since `error_info/1` can already
handle the current shape. Also, make sure to translate the reason to binary for
consistency with the other filter fetching errors in the
`couch_replicator_filters` module.

Add a test to ensure we return the `filter_fetch_error` term as that is
explicitly turned into a 404 error in chttpd, so we try to maintain
compatibility with CouchDB &lt;= 3.x code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix flaky couch_replicator_job_server tests</title>
<updated>2020-09-17T18:25:03+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-09-17T18:21:52+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=ffb85f17714330e0ef859e7f79c9c5d230e331f4'/>
<id>ffb85f17714330e0ef859e7f79c9c5d230e331f4</id>
<content type='text'>
Job exits are asynchronous so we ensure we wait for exit signals to be handled
before checking the state.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Job exits are asynchronous so we ensure we wait for exit signals to be handled
before checking the state.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update and clean up tests</title>
<updated>2020-09-15T20:13:46+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-08-28T08:36:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=ae858196848cf9533dfa03a2006227481f47388d'/>
<id>ae858196848cf9533dfa03a2006227481f47388d</id>
<content type='text'>
Update tests to use the new replicator. Also clean up redundancy and re-use
some of the newer macros from fabric2 (?TDEF_FE).

Make sure replicator tests are included in `make check`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update tests to use the new replicator. Also clean up redundancy and re-use
some of the newer macros from fabric2 (?TDEF_FE).

Make sure replicator tests are included in `make check`
</pre>
</div>
</content>
</entry>
<entry>
<title>Delete old 2.x-3.x replicator modules</title>
<updated>2020-09-15T20:13:46+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-08-28T08:31:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=4fc9a536ec85456ab60085f020548a08dd19ca36'/>
<id>4fc9a536ec85456ab60085f020548a08dd19ca36</id>
<content type='text'>
These modules are not used by the new replicator.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These modules are not used by the new replicator.
</pre>
</div>
</content>
</entry>
<entry>
<title>Preserve replication job stats when jobs are re-created</title>
<updated>2020-01-14T16:00:49+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-01-13T23:21:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=3573dcc10d7408f819e87c4c6454519cf1fd0c84'/>
<id>3573dcc10d7408f819e87c4c6454519cf1fd0c84</id>
<content type='text'>
Previously we made sure replication job statistics were preserved when
the jobs were started and stopped by the scheduler. However, if a db
node restarted or user re-created the job, replication stats would be
reset to 0.

Some statistics like `docs_read` and `docs_written` are perhaps not as
critical. However `doc_write_failures` is. That is the indicator that
some replication docs have not replicated to the target. Not
preserving that statistic meant users could perceive there was a data
loss during replication -- data was replicated successfully according
to the replication job with no write failures, user deletes source
database, then some times later noticed some of their data is missing.

These statistics were already logged in the checkpoint history and we
just had to initialize a stats object from them when a replication job
starts. In that initialization code we pick the highest values from
either the running scheduler or the checkpointed log. The reason is
that the running stats could be higher if say job was stopped suddenly
and failed to checkpoint but scheduler retained the data.

Fixes: #2414
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously we made sure replication job statistics were preserved when
the jobs were started and stopped by the scheduler. However, if a db
node restarted or user re-created the job, replication stats would be
reset to 0.

Some statistics like `docs_read` and `docs_written` are perhaps not as
critical. However `doc_write_failures` is. That is the indicator that
some replication docs have not replicated to the target. Not
preserving that statistic meant users could perceive there was a data
loss during replication -- data was replicated successfully according
to the replication job with no write failures, user deletes source
database, then some times later noticed some of their data is missing.

These statistics were already logged in the checkpoint history and we
just had to initialize a stats object from them when a replication job
starts. In that initialization code we pick the highest values from
either the running scheduler or the checkpointed log. The reason is
that the running stats could be higher if say job was stopped suddenly
and failed to checkpoint but scheduler retained the data.

Fixes: #2414
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve replicator error reporting</title>
<updated>2020-01-13T21:36:29+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-01-13T17:29:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=efb374a6493c4220333a201b649649736ddcc528'/>
<id>efb374a6493c4220333a201b649649736ddcc528</id>
<content type='text'>
Previously many HTTP requests failed noisily with `function_clause` errors.
Expect some of those failures and handle them better. There are mainly 3 types
of improvements:

 1) Error messages are shorter. Instead of `function_clause` with a cryptic
 internal fun names, return a simple marker like `bulk_docs_failed`

 2) Include the error body if it was returned. HTTP failures besides the error
 code may contain useful information in the body to help debug the failure.

 3) Do not log or include the stack trace in the message. The error names are
 enough to identify the place were they are generated so avoid spamming the
 user and the logs with them. This is done by using `{shutdown, Error}` tuples
 to bubble up the error the replication scheduler.

There is a small but related cleanup of removing source and target monitors
since we'd want to handle those error better however those errors are never
triggered since we removed local replication endpoints recently.

Fixes: https://github.com/apache/couchdb/issues/2413
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously many HTTP requests failed noisily with `function_clause` errors.
Expect some of those failures and handle them better. There are mainly 3 types
of improvements:

 1) Error messages are shorter. Instead of `function_clause` with a cryptic
 internal fun names, return a simple marker like `bulk_docs_failed`

 2) Include the error body if it was returned. HTTP failures besides the error
 code may contain useful information in the body to help debug the failure.

 3) Do not log or include the stack trace in the message. The error names are
 enough to identify the place were they are generated so avoid spamming the
 user and the logs with them. This is done by using `{shutdown, Error}` tuples
 to bubble up the error the replication scheduler.

There is a small but related cleanup of removing source and target monitors
since we'd want to handle those error better however those errors are never
triggered since we removed local replication endpoints recently.

Fixes: https://github.com/apache/couchdb/issues/2413
</pre>
</div>
</content>
</entry>
<entry>
<title>Use separate requests to write design when replicating</title>
<updated>2020-01-09T19:21:36+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-01-08T17:25:53+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=e23f3ef36e0fc9647cd6770bebad4504a4381128'/>
<id>e23f3ef36e0fc9647cd6770bebad4504a4381128</id>
<content type='text'>
Design doc writes could fail on the target when replicating with non-admin
credentials. Typically the replicator will skip over them and bump the
`doc_write_failures` counter. However, that relies on the POST request
returning a `200 OK` response. If the authentication scheme is implemented such
that the whole request fails if some docs don't have enough permission to be
written, then the replication job ends up crashing with an ugly exception and
gets stuck retrying forever. In order to accomodate that scanario write _design
docs in their separate requests just like we write attachments.

Fixes: #2415
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Design doc writes could fail on the target when replicating with non-admin
credentials. Typically the replicator will skip over them and bump the
`doc_write_failures` counter. However, that relies on the POST request
returning a `200 OK` response. If the authentication scheme is implemented such
that the whole request fails if some docs don't have enough permission to be
written, then the replication job ends up crashing with an ugly exception and
gets stuck retrying forever. In order to accomodate that scanario write _design
docs in their separate requests just like we write attachments.

Fixes: #2415
</pre>
</div>
</content>
</entry>
<entry>
<title>Speedup eunit: couch_replicator_compact_tests</title>
<updated>2019-12-25T19:52:32+00:00</updated>
<author>
<name>Paul J. Davis</name>
<email>paul.joseph.davis@gmail.com</email>
</author>
<published>2019-12-19T20:41:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=3880c0bf0880c52636a98130d508b63df4af63c2'/>
<id>3880c0bf0880c52636a98130d508b63df4af63c2</id>
<content type='text'>
Increase the doc write batch count in the background writer process to
speed up the should_populate_and_compact test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Increase the doc write batch count in the background writer process to
speed up the should_populate_and_compact test.
</pre>
</div>
</content>
</entry>
<entry>
<title>Return detailed replication stats for running and pending jobs</title>
<updated>2019-11-06T22:55:06+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2019-10-31T15:58:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=ec23c342b722db289c3dd54fc61221ae26dec7b5'/>
<id>ec23c342b722db289c3dd54fc61221ae26dec7b5</id>
<content type='text'>
Previously `_scheduled/docs` returned detailed replication statistics for
completed jobs only. To get the same level of details from a running or pending
jobs users had to use `_active_tasks`, which is not optimal and required jumping
between monitoring endpoints.

`info` field was originally meant to hold these statistics but they were not
implemented and it just returned `null` as a placeholder. With work for 3.0
finalizing, this might be a good time to add this improvement to avoid
disturbing the API afterwards.

Just updating the `_scheduler/docs` was not quite enough since, replications
started from the `_replicate` endpoint would not be visible there and users
would still have to access `_active_tasks` to get inspect them, so let's add
the `info` field to the `_scheduler/jobs` as well.

After this update, all states and status details from `_active_tasks` and
`_replicator` docs should be available under `_scheduler/jobs` and
`_scheduler/docs` endpoints.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously `_scheduled/docs` returned detailed replication statistics for
completed jobs only. To get the same level of details from a running or pending
jobs users had to use `_active_tasks`, which is not optimal and required jumping
between monitoring endpoints.

`info` field was originally meant to hold these statistics but they were not
implemented and it just returned `null` as a placeholder. With work for 3.0
finalizing, this might be a good time to add this improvement to avoid
disturbing the API afterwards.

Just updating the `_scheduler/docs` was not quite enough since, replications
started from the `_replicate` endpoint would not be visible there and users
would still have to access `_active_tasks` to get inspect them, so let's add
the `info` field to the `_scheduler/jobs` as well.

After this update, all states and status details from `_active_tasks` and
`_replicator` docs should be available under `_scheduler/jobs` and
`_scheduler/docs` endpoints.
</pre>
</div>
</content>
</entry>
</feed>
