Skip to content

Commit

Permalink
Added config 'track_total_hits' for patching in embedded-CS for Erchef (
Browse files Browse the repository at this point in the history
#8699)

* adding patchable config for tracktotalhits field in reindexing in embedded-cs.

Signed-off-by: talktovikas <[email protected]>

* changes for docs for track_total_hits config.

Signed-off-by: talktovikas <[email protected]>

* binding track_total_hits to sys.config

Signed-off-by: talktovikas <[email protected]>

---------

Signed-off-by: talktovikas <[email protected]>
  • Loading branch information
talktovikas authored Dec 23, 2024
1 parent a8b8e24 commit f273736
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 180 deletions.
1 change: 1 addition & 0 deletions api/config/erchef/config_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func DefaultConfigRequest() *ConfigRequest {
c.V1.Sys.Index.ReindexSleepMinMs = w.Int32(500)
c.V1.Sys.Index.ReindexSleepMaxMs = w.Int32(2000)
c.V1.Sys.Index.ReindexItemRetries = w.Int32(3)
c.V1.Sys.Index.TrackTotalHits = w.Bool(false)

c.V1.Sys.Authz.Fanout = w.Int32(20)
c.V1.Sys.Authz.Timeout = w.Int32(2000)
Expand Down
373 changes: 193 additions & 180 deletions api/config/erchef/config_request.pb.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions api/config/erchef/config_request.proto
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ message ConfigRequest {
google.protobuf.StringValue search_queue_mode = 12;
google.protobuf.StringValue search_auth_username = 13;
google.protobuf.StringValue search_auth_password = 14;
google.protobuf.BoolValue track_total_hits = 15;
}

message Authz {
Expand Down
1 change: 1 addition & 0 deletions components/automate-cs-oc-erchef/habitat/config/sys.config
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
{search_batch_max_wait, {{cfg.index.batch_max_wait}}},
{reindex_sleep_min_ms, {{cfg.index.reindex_sleep_min_ms}}},
{reindex_sleep_max_ms, {{cfg.index.reindex_sleep_max_ms}}},
{track_total_hits, {{cfg.index.track_total_hits}}},
{reindex_item_retries, {{cfg.index.reindex_item_retries}}},
{solr_service, [
{{#eachAlive bind.automate-es-gateway.members as |member| ~}}
Expand Down
1 change: 1 addition & 0 deletions components/automate-cs-oc-erchef/habitat/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ batch_max_wait = 10
reindex_batch_size=10
reindex_sleep_min_ms=50
reindex_sleep_max_ms=2000
track_total_hits=false
reindex_item_retries=3
search_provider="opensearch"
search_queue_mode="batch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The list of parameters are as follows:
| opscode_erchef['reindex_sleep_min_ms'] | 500 | 500 | ```[erchef.v1.sys.index]```<br>```reindex_sleep_min_ms=500``` |
| opscode_erchef['reindex_sleep_max_ms'] | 2000 | 2000 | ```[erchef.v1.sys.index]```<br>```reindex_sleep_max_ms=2000``` |
| opscode_erchef['reindex_item_retries'] | 3 | 3 | ```[erchef.v1.sys.index]```<br>```reindex_item_retries=3``` |
| opscode_erchef['track_total_hits'] | FALSE | FALSE | ```[erchef.v1.sys.index]```<br>```track_total_hits=false``` |
| opscode_erchef['cbv_cache_enabled'] | FALSE | FALSE | ```[erchef.v1.sys.api]```<br>```cbv_cache_enabled=false``` |
| opscode_erchef['search_queue_mode'] | batch | batch | ```[erchef.v1.sys.index]```<br>```search_queue_mode="batch"``` |
| opscode_erchef['s3_enabled'] | FALSE | FALSE | ```[erchef.v1.sys.api]```<br>```s3_enabled="true"``` |
Expand Down

0 comments on commit f273736

Please sign in to comment.