Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize some config options #3609

Merged
merged 1 commit into from Jun 21, 2021
Merged

Normalize some config options #3609

merged 1 commit into from Jun 21, 2021

Conversation

jiahuili430
Copy link
Contributor

@jiahuili430 jiahuili430 commented Jun 7, 2021

Overview

Normalize some configuration options to comment out the default.ini file.

Testing recommendations

Related Issues or Pull Requests

fixes #3473

Checklist

  • Code is written and works correctly
  • Changes are covered by tests
  • Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation

@jiahuili430 jiahuili430 changed the title Normalise all config options Normalize some config options Jun 8, 2021
src/chttpd/src/chttpd.erl Outdated Show resolved Hide resolved
src/chttpd/src/chttpd.erl Outdated Show resolved Hide resolved


get_compression_method() ->
case config:get("couchdb", "file_compression") of
case config:get("couchdb", "file_compression", ?DEFAULT_FILE_COMPRESSION) of
Copy link
Contributor

@nickva nickva Jun 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can re-use the constant from couch_db.hrl:

https://github.com/apache/couchdb/blob/3.x/src/couch/include/couch_db.hrl#L16

And I think that would happen if we just leave the code as is. In the line below if config:get("couchdb", "file_compression") is undefined it should pick ?DEFAULT_COMPRESSION which is snappy (an atom).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed back.

@jiahuili430 jiahuili430 marked this pull request as ready for review June 17, 2021 21:14
src/chttpd/src/chttpd.erl Outdated Show resolved Hide resolved
src/mem3/src/mem3.erl Outdated Show resolved Hide resolved
@jiahuili430 jiahuili430 requested a review from iilyak June 18, 2021 18:28
Copy link
Contributor

@iilyak iilyak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Great work.

@iilyak iilyak merged commit 9337019 into apache:3.x Jun 21, 2021
@jiahuili430 jiahuili430 deleted the normalise-config-options branch June 21, 2021 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants