Skip to content

Commit 1151e22

Browse files
committed
Cherry-pick main changes into 3.5.x
This is an amalgamated commit from these commits: edit d6e284e # Protect 3.5.x branch fixup 0b85b41 # dev/run: complete Erlang cookie configuration fixup 9cd7752 # No cfile support for 32bit systems fixup 8ae40d8 # Update QuickJS: FP16 support, regex escape compat fixup 942c94e # Fix mem3_util overlapping shards fixup c6fc3cb # Always allow mem3_rep checkpoints fixup 5693d72 # Add retries to native full CI stage fixup 1fe50d7 # Ignore extraneous cookie in replicator session plugin fixup 03f0acc # Enable Clouseau for the Windows CI fixup 0da8cf2 # Bump Clouseau to 2.25.0 fixup ed763ef # Bump process limit to 1M fixup 234a01f # doc: add https to allowed replication proxy protocols fixup 859fbcd # Improve `couch_debug.erl` (#5542) fixup fa2d524 # Fix config key typo in mem3_reshard_dbdoc fixup fdb7cc1 # Fix reshard doc section name fixup 7397df5 # Don't spawn more than one init_delete_dir instance fixup 65f97ae # Improve init_delete_dir fixup 6e88530 # QuickJS update fixup 88f424c # Improve `clouseau_rpc.erl` fixup 0c6237e # Handle shard opener tables not being initializes better fixup dc9837f # Improve mem3 supervisor fixup 2574fd1 # Improve cluster startup logging fixup adbc948 # Fix QuickJS bigint heap overflow fixup 3cfd7e4 # Handle `bad_generator` and `case_clause` in ken_server fixup 7ef02ab # Improve replicator client mailbox flush fixup 20701cb # Add guards to `fabric:design_docs/1` to prevent function_clause error fixup b2cbfb8 # Bump requests to 2.32.4 and set trust_env=False fixup 0047834 # Set Erlang/OTP 26 as minimum supported version fixup 8700799 # Use the built-in binary hex encode fixup fff371b # Use maps comprehensions and generators in a few places fixup cedeb73 # doc: add AI policy h/t @dch fixup 7a8e19e # Remove lto for quickjs fixup a179d0c # Skip macos CI for now and remove Ubuntu Focal fixup 02e2930 # Upgrade Erlang for CI fixup 5ee3d73 # Remove a few more instances of Ubuntu Focal fixup 1a58a1c # Update QuickJS fixup 6e0e8f3 # Run test262 JS conformance tests for QuickJS fixup bd0139e # Document how to mitigate high memory usage in docker fixup 1b62f06 # wip suggestion for fsync pr fixup 5e658d3 # Add tests for write_header/3 with [sync] fixup ce10423 # Use couch_file:write_header(., [sync]) in couch_bt_engine:commit_data/1 fixup 8f2c253 # docs/replication: change unauthorized example to 401 fixup aae623b # Don't wait indefinitely for replication jobs to stop fixup e3e445f # Improve mem3_rep:find_source_seq/4 logging fixup 58c5614 # fix couch_util:set_value/3 fixup 2cf6e55 # Populate zone from `COUCHDB_ZONE` env variable fixup febba3e # update docs fixup 66ed283 # Avoid making a mess in the logs when stopping replicator app fixup a5db313 # Make replicator shutdown a bit more orderly fixup 786dc5d # Fix query args parsing during cluster upgrades fixup 9b2c1fe # Print the name of the failed property test fixup c609d47 # nouveau: use http/2 fixup 4d24a70 # chore(docs): avoid master wording at setup cluster fixup 074e3a4 # don't start gun if nouveau disabled fixup 2fc406b # address PR feedback - move state to gen_server fixup b7adda9 # use ASF fork of gun for cowlib dep fixup 25acff4 # fix CI fixup 66996a1 # docs: securing nouveau on http/2 fixup b936d99 # Increase some test timeouts to hopefully fix a flaky PPC64LE test fixup e5175d1 # Add a range_to_hex/1 utility function fixup 540ca24 # Improve scanner performance fixup bdc7904 # Stop replication jobs to nodes which are not part of the cluster fixup b22adbb # In the scanner, traverse docs by sequence instead of by ID. fixup 27888d9 # DRY out couch_bt_engine header pointer term access fixup d25ff91 # Implement the ability to downgrade CouchDB versions fixup f8c5938 # allow stale queries fixup a2ae7e3 # optimize searches when index is fresh fixup 2e49f74 # stale test fixup 35f3d4f # Use copy_props in the compactor instead of set_props fixup bf8f489 # Minor couch_btree refactoring fixup bb20830 # retry if no connection available fixup 36b19b4 # switch to couch_util:to_hex_bin fixup 0c15f0f # gun takes iodata so no need for io_lib or flatten fixup 7a15840 # QuickJS Update fixup 8c3df03 # include rev when scanning fixup 866348c # Avoid timeouts in ddoc scanner callback fixup 044f746 # enhance _nouveau_cleanup fixup 89b42ab # BTree engine term cache fixup 6568e2a # Use config:get_integer/3 in couch_btree fixup 6fb33ba # Fix and improve couch_btree testing fixup d4f4211 # Prevent B-tree duplicate entries. Add property tests. fixup 9db197a # Reduce btree prop test count a bit fixup 29518a4 # Use OS certificates for replication fixup 8f086d1 # Allow user to customize the `Timeout` threshold for checking search services fixup df2ff63 # Remove redundant *_to_list / list_to_* conversion fixup 4a6ce81 # Fix reduce_limit = log feature fixup 5ccfa2e # Configure ELP fixup 00b6849 # Add write limiting to the scanner fixup 2802610 # Upgrade erlfmt and rebar3 fixup 0cc1ba4 # Implement prop updates for shards fixup 29f3992 # Document that _all_dbs endpoint supports inclusive_end query param fixup 8db6286 # Retry call to dreyfus index on noproc errors fixup a0b43b1 # Remove absolete clauses from dreyfus fixup f51f608 # Remove pointless message fixup 0e15915 # Add delay before retry fixup e4979be # dev: support multiarch names (Debian based systems) (#5626) fixup 3bf07be # Use upgraded Erlang CI images fixup 3969b40 # fix homebrew spidermonkey build fixup d174005 # fix centos/freebsd build fixup 030bb8f # Unify CI jobs fixup 2a96d0f # Remove old Jenkinsfiles fixup 4208633 # more informative error if epochs out of order fixup c3c98e2 # Disable ppc64le and s390x builds fixup 3444f52 # Add Trixie to CI fixup e1c60c3 # Update mochiweb to v3.3.0 fixup b2a5a93 # Update xxHash fixup 7a32ab7 # Update QuickJS fixup 7bcf1a5 # fix make clean after dev/run --enable-tls fixup 3754deb # Cache and store mem3 shard properties in one place only fixup 2caf341 # Print request/response body on errors from mango test suite fixup 8ab2dbc # Add setup documentation for two factor authentication (#5674) fixup fffa62e # Replace `gen_server:format_status/2` with `format_status/1` fixup c52d67d # Fix config options (#5642) fixup 01520a6 # Handle plugin stops without crashing fixup e65aa5e # Reschedule scanner plugins if they return skip on start or resume fixup 55b5327 # feat(configure): add --disable-spidermonkey to --dev[-with-nouveau] fixup 4f7f46f # Implement db doc updating fixup ba771b4 # Update QuickJS fixup 7066c8e # doc: update install instructions fixup 1908ea2 # Fix run_on_first_node scanner features fixup ee2bfe8 # Sequestrate docker ARM builds and fail early fixup 0266498 # Handle timeout in `dreyfus_fabric_search:go` fixup abe1f6e # Fix props caching in mem3 fixup 1eb2ea5 # QuickJS Update fixup 31de49a # Fix `case_clause` when got `missing_target` error fixup dac11b2 # Remove `erlang:` prefix from `erlang:error()` fixup d002480 # Remove explicit erlang module prefix for auto-imported functions fixup d377697 # Add assert comments to search related elixir tests fixup 0a1e264 # Implement 'assert_on_status' macro fixup 6396568 # More QuickJS Optimization fixup 55fc7cb # Tighten the rules for parsing time periods fixup 2fc64fd # Add UUID v7 fixup 66a053c # Optimize purge fixup 7c33b28 # Replace `dbg:stop_clear/0` with `dbg:stop/0` fixup 7ada539 # Optimize revid parsing: 50-90% faster fixup cc27d73 # Use determistic doc IDs in Mango key test fixup 83aa0da # Docs: Update the /_up endpoint docs to include status response's fixup 3b05609 # Remove purge max_document_id_number and change max_revisions_number fixup 3ecef04 # Update QuickJS: faster context creation and faster dbuf fixup e76a8b6 # Increase timeout for `process_response/3` to fix flaky tests fixup 416e077 # QuickJS Update. Optimized string operations. fixup 2903cd5 # improve search test fixup 2a9c1bd # Avoid using function closures in mem3 fixup 76577f3 # Optimize purge. ~30% for large batches. fixup 0182fd1 # Improve index cleanup fixup c543a88 # Cleanup fabric r/w parameter handling fixup 743312c # Remove hastings references fixup 74039c4 # Do not check for dreyfus fixup db57168 # fixup: remove HAVE_DREYFUS refs fixup 458bc0d # Update elp toml file fixup e3583db # Use "all" ring options for purged_infos fixup 39cb8c5 # Update deps: fauxton, meck and proper fixup 516df23 # Fix typo in .elp.toml fixup 53a6db7 # Ignore design docs in the shards db in the scanner
1 parent 11f0d36 commit 1151e22

File tree

331 files changed

+14353
-6269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+14353
-6269
lines changed

.asf.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ github:
4040
strict: true
4141
contexts:
4242
- continuous-integration/jenkins/pr-merge
43+
3.5.x:
44+
required_status_checks:
45+
strict: true
4346
3.4.x:
4447
required_status_checks:
4548
strict: true

.elp.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[build_info]
2+
apps = ["src/*"]
3+
# 3rd party dependencies (not type-checked), defaults to [] (see rebar.config.script)
4+
deps = [
5+
"src/erlfmt",
6+
"src/rebar",
7+
"src/rebar3",
8+
"src/meck",
9+
"src/cowlib",
10+
"src/gun",
11+
"src/recon",
12+
"src/proper",
13+
"src/fauxton",
14+
"src/docs",
15+
"src/meck",
16+
"src/jiffy",
17+
"src/ibrowse",
18+
"src/mochiweb",
19+
"src/snappy"
20+
]
21+
# List of OTP application names to exclude from indexing. This can help improve performance by not loading rarely used OTP apps.
22+
[otp]
23+
exclude_apps = [
24+
"megaco",
25+
"common_test",
26+
"edoc",
27+
"eldap",
28+
"erl_docgen",
29+
"et",
30+
"ftp",
31+
"mnesia",
32+
"odbc",
33+
"observer",
34+
"snmp",
35+
"tftp",
36+
"wx",
37+
"xmerl"
38+
]

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ src/couch/priv/couchspawnkillable
5353
src/couch/priv/couch_ejson_compare/couch_ejson_compare.d
5454
src/couch/priv/couch_js/**/*.d
5555
src/couch/priv/icu_driver/couch_icu_driver.d
56+
src/cowlib/
5657
src/mango/src/mango_cursor_text.nocompile
5758
src/excoveralls/
5859
src/fauxton/
5960
src/folsom/
61+
src/gun/
6062
src/hackney/
6163
src/hqueue/
6264
src/ibrowse/

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,19 @@ hub checkout link-to-pull-request
302302
meaning that you will automatically check out the branch for the pull request,
303303
without needing any other steps like setting git upstreams! :sparkles:
304304

305+
## Artificial Intelligence and Large Language Models Contributions Policy
306+
307+
The CouchDB project has a long-standing focus on license compatibility, and
308+
appropriate attribution of source code. AI and LLMs, by their nature, are unable
309+
to provide the necessary assurance, that the generated material is compatible
310+
with the Apache 2 license, or that the material has been appropriately
311+
attributed to the original authors.
312+
313+
Thus, it is expressly forbidden to contribute material generated by AI, LLMs,
314+
and similar technologies, to the CouchDB project. This includes, but is not
315+
limited to, source code, documentation, commit messages, or any other areas of
316+
the project.
317+
305318
## Thanks
306319

307320
Special thanks to [Hoodie][#gh_hoodie] for the great

INSTALL.Unix.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Apache CouchDB INSTALL.Unix
22

3-
A high-level guide to Unix-like systems, inc. Mac OS X and Ubuntu.
3+
A high-level guide to Unix-like systems, inc. macOS and Ubuntu.
44

55
Community installation guides are available on the wiki:
66

@@ -84,9 +84,9 @@ You can install the dependencies by running:
8484

8585
You can install Node.JS via [NodeSource](https://github.com/nodesource/distributions#rpminstall).
8686

87-
### Mac OS X
87+
### macOS
8888

89-
To build CouchDB from source on Mac OS X, you will need to install
89+
To build CouchDB from source on macOS, you will need to install
9090
the Command Line Tools:
9191

9292
xcode-select --install
@@ -96,16 +96,22 @@ You can then install the other dependencies by running:
9696
brew install autoconf autoconf-archive automake libtool \
9797
erlang icu4c spidermonkey pkg-config
9898

99+
Note that newer versions of Homebrew install `icu4c` as “keg-only”.
100+
That means the CouchDB build system can’t find it. Either follow
101+
the instructions presented by Homebrew or run
102+
103+
brew link icu4c
104+
99105
You can install Node.JS via the
100106
[official Macintosh installer](https://nodejs.org/en/download/).
101107

102108
You will need Homebrew installed to use the `brew` command.
103109

104110
Learn more about Homebrew at:
105111

106-
http://mxcl.github.com/homebrew/
112+
https://brew.sh
107113

108-
Some versions of Mac OS X ship a problematic OpenSSL library. If
114+
Some versions of macOS ship a problematic OpenSSL library. If
109115
you're experiencing troubles with CouchDB crashing intermittently with
110116
a segmentation fault or a bus error, you will need to install your own
111117
version of OpenSSL. See the wiki, mentioned above, for more information.
@@ -169,7 +175,7 @@ On many Unix-like systems you can run:
169175
--group --gecos \
170176
"CouchDB Administrator" couchdb
171177

172-
On Mac OS X you can use the Workgroup Manager to create users up to version
178+
On macOS you can use the Workgroup Manager to create users up to version
173179
10.9, and dscl or sysadminctl after version 10.9. Search Apple's support
174180
site to find the documentation appropriate for your system. As of recent
175181
versions of OS X, this functionality is also included in Server.app,

Makefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ EXUNIT_OPTS=$(subst $(comma),$(space),$(tests))
9595

9696
TEST_OPTS="-c 'startup_jitter=0' -c 'default_security=admin_local' -c 'iterations=9'"
9797

98+
ifneq ($(ERLANG_COOKIE),)
99+
TEST_OPTS+=" --erlang-cookie=$(ERLANG_COOKIE)"
100+
endif
101+
98102
################################################################################
99103
# Main commands
100104
################################################################################
@@ -350,6 +354,12 @@ weatherreport-test: devclean escriptize
350354
@dev/run "$(TEST_OPTS)" -n 1 -a adm:pass --no-eval \
351355
'bin/weatherreport --etc dev/lib/node1/etc --level error'
352356

357+
.PHONY: quickjs-test262
358+
# target: quickjs-javascript-tests - Run QuickJS JS conformance tests
359+
quickjs-test262: couch
360+
make -C src/couch_quickjs/quickjs test2-bootstrap
361+
make -C src/couch_quickjs/quickjs test2
362+
353363
################################################################################
354364
# Developing
355365
################################################################################
@@ -474,15 +484,20 @@ clean:
474484
@rm -rf .rebar/
475485
@rm -f bin/couchjs
476486
@rm -f bin/weatherreport
477-
@rm -rf src/*/ebin
487+
@find src/*/ebin \
488+
-not -path 'src/cowlib/ebin/cowlib.app' \
489+
-not -path 'src/cowlib/ebin' \
490+
-not -path 'src/gun/ebin/gun.app' \
491+
-not -path 'src/gun/ebin' \
492+
-delete
478493
@rm -rf src/*/.rebar
479494
@rm -rf src/*/priv/*.so
480495
@rm -rf share/server/main.js share/server/main-ast-bypass.js share/server/main-coffee.js
481496
@rm -rf tmp dev/data dev/lib dev/logs
482497
@rm -rf src/mango/.venv
483498
@rm -f src/couch/priv/couch_js/config.h
484499
@rm -f dev/*.beam dev/devnode.* dev/pbkdf2.pyc log/crash.log
485-
@rm -f src/couch_dist/certs/out
500+
@rm -rf src/couch_dist/certs/out
486501
@rm -rf src/docs/build src/docs/.venv
487502
ifeq ($(with_nouveau), true)
488503
@cd nouveau && $(GRADLE) clean

Makefile.win

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ EXUNIT_OPTS=$(subst $(comma),$(space),$(tests))
9393

9494
TEST_OPTS="-c startup_jitter=0 -c default_security=admin_local -c iterations=9"
9595

96+
ifneq ($(ERLANG_COOKIE),)
97+
TEST_OPTS+=" --erlang-cookie=$(ERLANG_COOKIE)"
98+
endif
99+
96100
################################################################################
97101
# Main commands
98102
################################################################################

README-DEV.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,16 @@ Centos 7 and RHEL 7
111111
python-pygments gnupg nodejs npm
112112

113113

114-
Mac OS X
115-
~~~~~~~~
114+
macOS
115+
~~~~~
116116

117117
Install `Homebrew <https://brew.sh/>`_, if you do not have it already.
118118

119119
Unless you want to install the optional dependencies, skip to the next section.
120120

121121
Install what else we can with Homebrew::
122122

123-
brew install help2man gnupg md5sha1sum node python
123+
brew install help2man gnupg md5sha1sum node python elixir
124124

125125
If you don't already have pip installed, install it::
126126

@@ -311,9 +311,9 @@ follows::
311311

312312
dev/run --with-clouseau
313313

314-
When a specific Erlang cookie string is set in
315-
``rel/overlay/etc/vm.args``, the ``--erlang-cookie`` flag could be
316-
used to configure Clouseau to work with that::
314+
When a specific Erlang cookie string is needed, the
315+
``--erlang-cookie`` flag could be used to configure CouchDB and
316+
Clouseau to work with that::
317317

318318
dev/run --with-clouseau --erlang-cookie=brumbrum
319319

0 commit comments

Comments
 (0)