You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2021/06/03 23:05:00 UTC

[couchdb] branch bump-smoosh-slack created (now f4e74f6)

This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch bump-smoosh-slack
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at f4e74f6  Improve smoosh defaults for slack channel

This branch includes the following new commits:

     new f4e74f6  Improve smoosh defaults for slack channel

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[couchdb] 01/01: Improve smoosh defaults for slack channel

Posted by wo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch bump-smoosh-slack
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit f4e74f67b67e85307fffc0c815323ddc8e1b39fb
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Thu Jun 3 19:04:41 2021 -0400

    Improve smoosh defaults for slack channel
---
 rel/overlay/etc/default.ini      |  4 ++--
 src/smoosh/src/smoosh_server.erl | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini
index 5f69076..5ac8da6 100644
--- a/rel/overlay/etc/default.ini
+++ b/rel/overlay/etc/default.ini
@@ -626,11 +626,11 @@ writer = stderr
 ;
 ;[smoosh.slack_dbs]
 ;priority = slack
-;min_priority = 16777216
+;min_priority = 536870912
 ;
 ;[smoosh.slack_views]
 ;priority = slack
-;min_priority = 16777216
+;min_priority = 536870912
 
 [ioq]
 ; The maximum number of concurrent in-flight IO requests that
diff --git a/src/smoosh/src/smoosh_server.erl b/src/smoosh/src/smoosh_server.erl
index 6269608..f088c54 100644
--- a/src/smoosh/src/smoosh_server.erl
+++ b/src/smoosh/src/smoosh_server.erl
@@ -364,7 +364,7 @@ get_priority(Channel, DiskSize, DataSize, NeedsUpgrade) ->
     Priority = get_priority(Channel),
     MinSize = to_number(Channel, "min_size", "1048576"),
     MaxSize = to_number(Channel, "max_size", "infinity"),
-    DefaultMinPriority = case Priority of "slack" -> "16777216"; _ -> "2.0" end,
+    DefaultMinPriority = case Priority of "slack" -> "536870912"; _ -> "2.0" end,
     MinPriority = to_number(Channel, "min_priority", DefaultMinPriority),
     MaxPriority = to_number(Channel, "max_priority", "infinity"),
     if Priority =:= "upgrade", NeedsUpgrade ->
@@ -529,10 +529,10 @@ t_ratio_view({ok, Shard, GroupId}) ->
 t_slack_view({ok, Shard, GroupId}) ->
     ?_test(begin
         meck:expect(couch_index, get_info, fun(_) ->
-            {ok, [{sizes, {[{file, 33554432}, {active, 16777215}]}}]}
+            {ok, [{sizes, {[{file, 1073741824}, {active, 536870911}]}}]}
         end),
-        ?assertEqual(2.0000001192092967, get_priority("ratio_views", {Shard, GroupId})),
-        ?assertEqual(16777217, get_priority("slack_views", {Shard, GroupId})),
+        ?assertEqual(2.0000000037252903, get_priority("ratio_views", {Shard, GroupId})),
+        ?assertEqual(536870913, get_priority("slack_views", {Shard, GroupId})),
         ?assertEqual(0, get_priority("upgrade_views", {Shard, GroupId}))
     end).
 
@@ -542,7 +542,7 @@ t_no_data_view({ok, Shard, GroupId}) ->
             {ok, [{sizes, {[{file, 5242880}, {active, 0}]}}]}
         end),
         ?assertEqual(2.0, get_priority("ratio_views", {Shard, GroupId})),
-        ?assertEqual(16777216, get_priority("slack_views", {Shard, GroupId})),
+        ?assertEqual(536870912, get_priority("slack_views", {Shard, GroupId})),
         ?assertEqual(2.0, get_priority("upgrade_views", {Shard, GroupId}))
     end).