Skip to content

03 operator tests to elixir#11

Open
hulkoba wants to merge 166 commits intoport-python-testsfrom
03-operator-test
Open

03 operator tests to elixir#11
hulkoba wants to merge 166 commits intoport-python-testsfrom
03-operator-test

Conversation

@hulkoba
Copy link

@hulkoba hulkoba commented Nov 11, 2025

Overview

Testing recommendations

Related Issues or Pull Requests

Checklist

  • Code is written and works correctly
  • Changes are covered by tests
  • Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • Documentation changes were made in the src/docs folder
  • Documentation changes were backported (separated PR) to affected branches

@hulkoba hulkoba added the draft label Nov 11, 2025
@hulkoba hulkoba changed the title WIP: port common base operator tests to elixir port operator tests to elixir Nov 11, 2025
@hulkoba hulkoba marked this pull request as ready for review November 11, 2025 13:29
@hulkoba hulkoba changed the title port operator tests to elixir 03 operator tests to elixir Nov 14, 2025
@hulkoba hulkoba force-pushed the port-python-tests branch 8 times, most recently from c413a13 to 25f1f55 Compare November 19, 2025 14:21
@hulkoba hulkoba force-pushed the 03-operator-test branch 2 times, most recently from a4ea031 to e667cd0 Compare November 24, 2025 10:10
rnewson and others added 29 commits February 11, 2026 18:28
- If there is no checkpoint and no `since_seq`, then replicate from scratch.
- If there is no checkpoint but `since_seq` is defined, then replicate with
  the `since_seq` field.
- If both checkpoint and `since_seq` exist, use the checkpoint to replicate.
- If the request includes `since_seq` field, the replication ID will be changed.
Previously we didn't handle the case when the "infinity" value was explicitly
set in the config file. We only handled the case when it was the default value.
When debugging processes getting stuck in hibernation bug [1] a few benchmarks
showed that hibernation can be pretty expensive. I saw 20% or so reduction in
latency in couch_work_queue if we hibernate after every single item insertion.

Erlang documents warn about this [2]:

> Use this feature with care, as hibernation implies at least two garbage
collections (when hibernating and shortly after waking up) and is not something
you want to do between each call to a busy server.

In a few places like the `couch_work_queue` and `couch_db_updater` we did
exactly that. However, since we added that more Erlang/OTP implemented a new
`gen_server` option - `{hibernate_after, Timeout}`. It will trigger hibernation
after an idle time. That seems ideal for us - it keeps expensive hibernation
out of the main data path, as docs warn us about, but once the server goes idle
we still get to run it to dereference any ref binaries.

Since we encountered the recent hibernation bug [1] also add an option to
disable it altogether, just to have a way to mitigate the issue when running on
OTP 27 and 28 before the fix is out.

[1] erlang/otp#10651
[2] https://www.erlang.org/doc/apps/stdlib/gen_server.html
[3] apache@d9eb87f
Send 404 for /_all_dbs and /_dbs_info with extra path parts
There are two main improvements:

1) Remove dynamic runtime reloading. That feature is not useful any longer
after we stopped doing online relups, and instead became a potential landmine
that can lead to metrics unexpectedly faling if stats description files, or
disk access to them changes at runtime. The only minor benefit previous
behavior had was was for local dev/run development, coupled with online module
reloading; but that hardly justifies the complexity and the confusion resulting
from stats all of the sudden breaking in production.

2) Strengthen a few asserts during stats loading. Only accept missing stats
description from applications, and stop on any other error. We don't want to
run with stats missing or unloadable or constantly spewing "unknown metric"
error.
…-arm

ci: temporarily disable freebsd-arm worker because it is too slow
…ct-index-test

Port Python test to Elixir: `12_use_correct_index_test`
…ult-field-test

Port Python test to Elixir: `06-text-default-field-test`
Port Python test to Elixir: `07_text_custom_field_list_test`
Almalinux 10 was enabled by Ronny in the couchdb-pkg repo!

Also, add an extra "intermediate" variant, that might be useful to
have especially before swithing the minimum up. In our case that's
Erlang 27.
path
open_doc
delete_doc
ddoc_info
delete_index
bulk_delete
Port Python test to Elixir: `01-index-crud-test`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.