couchdb:dreyfus-await-time

Last commit made on 2023-04-04
Get this branch:
git clone -b dreyfus-await-time https://git.launchpad.net/couchdb

Branch merges

Branch information

Name:
dreyfus-await-time
Repository:
lp:couchdb

Recent commits

126a28c... by Robert Newson <email address hidden>

WIP send await time in response header - dreyfus

a9bce2f... by Will Holley <email address hidden>

Merge pull request #4507 from apache/prometheus_metrics

feat: additional prometheus metrics

8c1ef5b... by Will Holley <email address hidden>

fix (prometheus): gauge types for metrics that can be decremented

Prometheus assumes that metrics with `counter` types are cumulative.
This isn't the case in CouchDB / Folsom, which allows counters to
be decremented.

This changes the type of metrics where we decrement the counter values
to `gauge`:

- couchdb_open_databases
- couchdb_couchdb_open_os_files
- couchdb_httpd_clients_requesting_changes

ee11952... by Will Holley <email address hidden>

feat (prometheus): membership metric

Add a gauge metric `membership` to the `_prometheus` endpoint. The metric
has labels:

- `nodes=all_nodes`
- `nodes=cluster_nodes`

matching the fields in the `_membership` endpoint (I think consistency
here is more useful than renaming the labels to e.g. expected/actual).

f4fd6b5... by Will Holley <email address hidden>

feat (prometheus): internal_replication_jobs metric

Adds an internal replication backlog metric. In the `_system` endpoint
this is called `internal_replication_jobs`, so I've preserved the name,
though it appears to represent the backlog of changes.

Adding a dependency on mem3 to `couch_prometheus` requires some changes
to the tests and dependency tree:
- `couchdb.app.src` no longer lists a dependency on `couch_prometheus`.
  I don't know why this was needed previously - it doesn't appear to be
  required.
- `couch_prometheus` now has dependencies on `couch` and `mem3`.
  This both ensures that `couch_prometheus` doesn't crash if mem3 isn't
  running and also resolves a race condition on startup where the
  `_prometheus` endpoint returns incomplete stats.
- `couch_prometheus:system_stats_test/0` is moved to
  `couch_prometheus_e2e_tests:t_starts_with_couchdb/0`. It is really
  an integration test, since it depends on the `_prometheus` endpoint
  being able to collect data for all the metrics, and it tests only
  that the metrics names begin with `couchdb_`.

bef20f3... by Will Holley <email address hidden>

feat (prometheus): metrics for individual message queues

The `_prometheus` endpoint today includes size/min/max metrics
across all message queues. This adds a new metric -
`erlang_message_queue_size{queue_name="<name>"}` which tracks the
size of individual message queues.

This could replace the previous metrics since those can be derived from
the new metric by prometheus, but I've left them in place for
compatibility.

d141255... by Ronny Berndt

docs(hosts): Remove misleading /etc/hosts info (#4506)

cd77b07... by Nick V.

Treat javascript internal errors as fatal

Spidermonkey sometimes throws an `InternalError` when exceeding memory limits,
when normally we'd expect it to crash or exit with a non-0 exit code. Because
we trap exceptions, and continue emitting rows, it is possible for users views
to randomly miss indexed rows based on whether GC had run or not, other
internal runtime state which may have been consuming more or less memory until
that time.

To prevent the view continuing processing documents, and randomly dropping
emitted rows, depending on memory pressure in the JS runtime at the time,
choose to treat Internal errors as fatal.

After an InternalError is raised we expect the process to exit just like it
would during OOM.

Add a test to assert this happens.

Fix https://github.com/apache/couchdb/issues/4504

75ee0f0... by Robert Newson <email address hidden>

Merge pull request #4503 from apache/410-gone

add error_info clause for 410 Gone

25d6e7d... by Robert Newson <email address hidden>

add error_info clause for 410 Gone