You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "jiahuili430 (via GitHub)" <gi...@apache.org> on 2025/09/08 19:15:38 UTC
[PR] Fix config options [couchdb]
jiahuili430 opened a new pull request, #5642:
URL: https://github.com/apache/couchdb/pull/5642
<!-- Thank you for your contribution!
Please file this form by replacing the Markdown comments
with your text. If a section needs no action - remove it.
Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
of code collaboration. Positive feedback is represented +1 from committers
and negative is a -1. The -1 also means veto, and needs to be addressed
to proceed. Once there are no objections, the PR can be merged by a
CouchDB committer.
See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
## Overview
<!-- Please give a short brief for the pull request,
what problem it solves or how it makes things better. -->
## Testing recommendations
<!-- Describe how we can test your changes.
Does it provide any behaviour that the end users
could notice? -->
## Related Issues or Pull Requests
<!-- If your changes affect multiple components in different
repositories please put links to those issues or pull requests here. -->
## 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5642:
URL: https://github.com/apache/couchdb/pull/5642#discussion_r2373461050
##########
rel/overlay/etc/default.ini:
##########
@@ -468,6 +476,16 @@ hash_algorithms = sha256, sha
;update_db = true
;[view_updater]
+; Configure the queue capacity used during indexing. These settings apply to
+; both the queue between the changes feed and the JS mapper, and between the
+; JS mapper and the disk writer.
+; Whichever limit hit first is the one that takes effect.
+
+; The maximum memory queue size
Review Comment:
`maximum queue memory size` may sound a bit better?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "jiahuili430 (via GitHub)" <gi...@apache.org>.
jiahuili430 commented on code in PR #5642:
URL: https://github.com/apache/couchdb/pull/5642#discussion_r2373404502
##########
rel/overlay/etc/default.ini:
##########
@@ -468,6 +476,22 @@ hash_algorithms = sha256, sha
;update_db = true
;[view_updater]
+; couch_work_queue:
Review Comment:
Updated, thank you for the the review!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "jiahuili430 (via GitHub)" <gi...@apache.org>.
jiahuili430 merged PR #5642:
URL: https://github.com/apache/couchdb/pull/5642
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5642:
URL: https://github.com/apache/couchdb/pull/5642#discussion_r2370251283
##########
rel/overlay/etc/default.ini:
##########
@@ -468,6 +476,22 @@ hash_algorithms = sha256, sha
;update_db = true
;[view_updater]
+; couch_work_queue:
Review Comment:
Hmm, maybe we shouldn't mention `couch_work_queue` per-se, that's seems too low level of a detail. It may be better to keep it general.
> Configure queue capacity used during indexing. These apply to both the queue between the changes feed and
the JS mapper, and between the JS mapper and the disk writer. Whichever limit happens to be hit first is the one that takes effect
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5642:
URL: https://github.com/apache/couchdb/pull/5642#discussion_r2373459741
##########
rel/overlay/etc/default.ini:
##########
@@ -468,6 +476,16 @@ hash_algorithms = sha256, sha
;update_db = true
;[view_updater]
+; Configure the queue capacity used during indexing. These settings apply to
+; both the queue between the changes feed and the JS mapper, and between the
+; JS mapper and the disk writer.
+; Whichever limit hit first is the one that takes effect.
Review Comment:
limit hit first -> limit is hit first
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5642:
URL: https://github.com/apache/couchdb/pull/5642#discussion_r2370260753
##########
rel/overlay/etc/default.ini:
##########
@@ -468,6 +476,22 @@ hash_algorithms = sha256, sha
;update_db = true
;[view_updater]
+; couch_work_queue:
+; Maximum item count and memory size (in bytes)
+; of the document changes and index update queues.
+;
+; The general structure is something like:
+; `_changes feed -> [workqueue] -> mapper -> [workqueue] -> index write`
+;
+; So we queue both the changes before and the writes after the mapper.
+; The setting here are applied to both queues. For each queue whichever
+; limit happens to be hit first is the one that take effect.
+
+; `max_size` of couch_work_queue
Review Comment:
Let's not use too many backquotes as these won't be rendered anywhere we can just say "The maximum memory queue size". We should expect users to open the erlang code editor and look up couch_work_queue and check out its max_size, it's for us (developers) mostly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5642:
URL: https://github.com/apache/couchdb/pull/5642#discussion_r2331345434
##########
rel/overlay/etc/default.ini:
##########
@@ -468,6 +475,8 @@ hash_algorithms = sha256, sha
;update_db = true
;[view_updater]
+;queue_memory_cap = 100000 ; `max_size` of couch_work_queue
Review Comment:
Maybe add the comments before the values like for most of our settings instead of inline.
Also it may help users if we explain what couch_work_queue is. It can be something "maximum item count and memory size (in bytes) of the document changes and index update queues".
The general structure is something like:
```
_changes feed ->[workqueue]-> map -> [workqueue] -> index write
```
So we queue both the changes before and the writes after the mapper. The setting here are applied to both queues. For each queue whichever limit happens to be hit first is the one that take effect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "jiahuili430 (via GitHub)" <gi...@apache.org>.
jiahuili430 commented on code in PR #5642:
URL: https://github.com/apache/couchdb/pull/5642#discussion_r2373481646
##########
rel/overlay/etc/default.ini:
##########
@@ -468,6 +476,16 @@ hash_algorithms = sha256, sha
;update_db = true
;[view_updater]
+; Configure the queue capacity used during indexing. These settings apply to
+; both the queue between the changes feed and the JS mapper, and between the
+; JS mapper and the disk writer.
+; Whichever limit hit first is the one that takes effect.
Review Comment:
Let's use your original words.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "jiahuili430 (via GitHub)" <gi...@apache.org>.
jiahuili430 commented on code in PR #5642:
URL: https://github.com/apache/couchdb/pull/5642#discussion_r2369970896
##########
rel/overlay/etc/default.ini:
##########
@@ -468,6 +475,8 @@ hash_algorithms = sha256, sha
;update_db = true
;[view_updater]
+;queue_memory_cap = 100000 ; `max_size` of couch_work_queue
Review Comment:
Updated the comment, thank you for the detailed explanation!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5642:
URL: https://github.com/apache/couchdb/pull/5642#discussion_r2370260753
##########
rel/overlay/etc/default.ini:
##########
@@ -468,6 +476,22 @@ hash_algorithms = sha256, sha
;update_db = true
;[view_updater]
+; couch_work_queue:
+; Maximum item count and memory size (in bytes)
+; of the document changes and index update queues.
+;
+; The general structure is something like:
+; `_changes feed -> [workqueue] -> mapper -> [workqueue] -> index write`
+;
+; So we queue both the changes before and the writes after the mapper.
+; The setting here are applied to both queues. For each queue whichever
+; limit happens to be hit first is the one that take effect.
+
+; `max_size` of couch_work_queue
Review Comment:
Let's not use too many backquotes as these won't be rendered anywhere we can just "The maximum queue length". We should expect users to open the erlang code editor and look up couch_work_queue and check out its max_size, it's for us (developers) mostly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix config options [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5642:
URL: https://github.com/apache/couchdb/pull/5642#discussion_r2370266712
##########
rel/overlay/etc/default.ini:
##########
@@ -468,6 +476,22 @@ hash_algorithms = sha256, sha
;update_db = true
;[view_updater]
+; couch_work_queue:
+; Maximum item count and memory size (in bytes)
+; of the document changes and index update queues.
+;
+; The general structure is something like:
+; `_changes feed -> [workqueue] -> mapper -> [workqueue] -> index write`
+;
+; So we queue both the changes before and the writes after the mapper.
+; The setting here are applied to both queues. For each queue whichever
+; limit happens to be hit first is the one that take effect.
+
+; `max_size` of couch_work_queue
+;queue_memory_cap = 100000
+; `max_items` of couch_work_queue
Review Comment:
Maybe something like "The maximum queue length" would work, so we don't have to mention `couch_work_queue`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org