You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2021/08/20 05:39:02 UTC

[couchdb] branch 3.x updated: Update smoosh docs to use rpc:multicall

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

vatamane pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/3.x by this push:
     new 33a66dd  Update smoosh docs to use rpc:multicall
33a66dd is described below

commit 33a66ddd46be1e8671eed05500a78823445cac67
Author: Russell Branca <ch...@apache.org>
AuthorDate: Wed Sep 30 16:52:24 2020 -0700

    Update smoosh docs to use rpc:multicall
---
 src/smoosh/operator_guide.md | 63 +++++++++++++++-----------------------------
 1 file changed, 21 insertions(+), 42 deletions(-)

diff --git a/src/smoosh/operator_guide.md b/src/smoosh/operator_guide.md
index a0c9810..afe08f8 100644
--- a/src/smoosh/operator_guide.md
+++ b/src/smoosh/operator_guide.md
@@ -146,47 +146,35 @@ along with the other defaults.
 
 ```bash
 # Define the new channel
-(couchdb@db1.foo.bar)3> s:set_config("smoosh.big_dbs", "min_size", "20000000000", global).
+(couchdb@db1.foo.bar)3> rpc:multicall(config, set, ["smoosh.big_dbs", "min_size", "20000000000"]).
 {[ok,ok,ok],[]}
-(couchdb@db1.foo.bar)3> s:set_config("smoosh.big_dbs", "concurrency", "2", global).
+(couchdb@db1.foo.bar)3> rpc:multicall(config, set, ["smoosh.big_dbs", "concurrency", "2"]).
 {[ok,ok,ok],[]}
 
 # Add the channel to the db_channels set -- note we need to get the original
 # value first so we can add the new one to the existing list!
-(couchdb@db1.foo.bar)5> s:get_config("smoosh", "db_channels", global).
-{[{'couchdb@db1.foo.bar',"ratio_dbs"},
-{'couchdb@db3.foo.bar',"ratio_dbs"},
-{'couchdb@db2.foo.bar',"ratio_dbs"}],
-[]}
-(couchdb@db1.foo.bar)6> s:set_config("smoosh", "db_channels", "ratio_dbs,big_dbs", global).
+(couchdb@db1.foo.bar)5> rpc:multicall(config, get, ["smoosh", "db_channels"]).
+{["ratio_dbs","ratio_dbs","ratio_dbs"],[]}
+(couchdb@db1.foo.bar)6> rpc:multicall(config, set, ["smoosh", "db_channels", "ratio_dbs,big_dbs"]).
 {[ok,ok,ok],[]}
 ```
 
 ### Viewing active channels
 
 ```bash
-(couchdb@db3.foo.bar)3> s:get_config("smoosh", "db_channels", global).
-{[{'couchdb@db3.foo.bar',"ratio_dbs,big_dbs"},
-  {'couchdb@db1.foo.bar',"ratio_dbs,big_dbs"},
-  {'couchdb@db2.foo.bar',"ratio_dbs,big_dbs"}],
- []}
-(couchdb@db3.foo.bar)4> s:get_config("smoosh", "view_channels", global).
-{[{'couchdb@db3.foo.bar',"ratio_views"},
-  {'couchdb@db1.foo.bar',"ratio_views"},
-  {'couchdb@db2.foo.bar',"ratio_views"}],
- []}
+(couchdb@db3.foo.bar)3> rpc:multicall(config, get, ["smoosh", "db_channels"]).
+{["ratio_dbs,big_dbs","ratio_dbs,big_dbs","ratio_dbs,big_dbs"],[]}
+(couchdb@db3.foo.bar)4> rpc:multicall(config, get, ["smoosh", "view_channels"]).
+{["ratio_views","ratio_views","ratio_views"],[]}
 ```
 
 ### Removing a channel
 
 ```bash
 # Remove it from the active set
-(couchdb@db1.foo.bar)5> s:get_config("smoosh", "db_channels", global).
-{[{'couchdb@db1.foo.bar',"ratio_dbs,big_dbs"},
-{'couchdb@db3.foo.bar',"ratio_dbs,big_dbs"},
-{'couchdb@db2.foo.bar',"ratio_dbs,big_dbs"}],
-[]}
-(couchdb@db1.foo.bar)6> s:set_config("smoosh", "db_channels", "ratio_dbs", global).
+(couchdb@db1.foo.bar)5> rpc:multicall(config, get, ["smoosh", "db_channels"]).
+{["ratio_dbs,big_dbs", "ratio_dbs,big_dbs", "ratio_dbs,big_dbs"],[]}
+(couchdb@db1.foo.bar)6> rpc:multicall(config, set, ["smoosh", "db_channels", "ratio_dbs"]).
 {[ok,ok,ok],[]}
 
 # Delete the config -- you need to do each value
@@ -201,11 +189,8 @@ along with the other defaults.
 As far as I know, you have to get each setting separately:
 
 ```
-(couchdb@db1.foo.bar)1> s:get_config("smoosh.big_dbs", "concurrency", global).
-{[{'couchdb@db3.foo.bar',"2"},
-  {'couchdb@db1.foo.bar',"2"},
-  {'couchdb@db2.foo.bar',"2"}],
- []}
+(couchdb@db1.foo.bar)1> rpc:multicall(config, get, ["smoosh.big_dbs", "concurrency"]).
+{["2","2","2"],[]}
 
 ```
 
@@ -214,7 +199,7 @@ As far as I know, you have to get each setting separately:
 The same as defining a channel, you just need to set the new value:
 
 ```
-(couchdb@db1.foo.bar)2> s:set_config("smoosh.ratio_dbs", "concurrency", "1", global).
+(couchdb@db1.foo.bar)2> rpc:multicall(config, set, ["smoosh.ratio_dbs", "concurrency", "1"]).
 {[ok,ok,ok],[]}
 ```
 
@@ -298,11 +283,8 @@ If it's falling behind (big queues), try increasing compaction priority.
 Smoosh's IOQ priority is controlled via the `ioq` -> `compaction` queue.
 
 ```
-> s:get_config("ioq", "compaction", global).
-{[{'couchdb@db1.foo.bar',undefined},
-  {'couchdb@db2.foo.bar',undefined},
-  {'couchdb@db3.foo.bar',undefined}],
- []}
+> rpc:multicall(config, get, ["ioq", "compaction"]).
+{[undefined,undefined,undefined],[]}
 
 ```
 
@@ -315,7 +297,7 @@ doesn't adversely impact the customer experience. If it will, and
 it's urgent, at least drop them a warning.
 
 ```
-> s:set_config("ioq", "compaction", "0.5", global).
+> rpc:multicall(config, set, ["ioq", "compaction", "0.5"]).
 {[ok,ok,ok],[]}
 ```
 
@@ -338,11 +320,8 @@ higher concurrency.
 The current setting can be seen for a channel like so:
 
 ```
-> s:get_config("smoosh.ratio_dbs", "concurrency", global).
-{[{'couchdb@db1.foo.bar',undefined},
-  {'couchdb@db2.foo.bar',undefined},
-  {'couchdb@db3.foo.bar',undefined}],
- []}
+> rpc:multicall(config, get, ["smoosh.ratio_dbs", "concurrency"]).
+{["2","2","2"], []}
 ```
 
 `undefined` means the default is used.
@@ -354,7 +333,7 @@ but evaluate this based on the current status.
 If we want to increase the ratio_dbs setting:
 
 ```
-> s:set_config("smoosh.ratio_dbs", "concurrency", "2", global).
+> rpc:multicall(config, set, ["smoosh.ratio_dbs", "concurrency", "2"]).
 {[ok,ok,ok],[]}
 ```