Merge ~ines-almeida/launchpad-layers:add-storm_cache_size-config into launchpad-layers:main

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: 07969165be6692a8843a8b164ce9ff531bba069e
Merge reported by: Ines Almeida
Merged at revision: 07969165be6692a8843a8b164ce9ff531bba069e
Proposed branch: ~ines-almeida/launchpad-layers:add-storm_cache_size-config
Merge into: launchpad-layers:main
Diff against target: 21 lines (+5/-0)
2 files modified
launchpad-db/config.yaml (+4/-0)
launchpad-db/templates/launchpad-db-lazr.conf (+1/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+449203@code.launchpad.net

Commit message

Add storm_cache_size param to launchpad-db config.yaml

Description of the change

The value for this param will be overwritten in the ppa publisher charm, but its config should be within the launchpaddb layer

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

I think you should also add `storm_cache_size: {{ storm_cache_size }}` to the `[database]` section in `launchpad-db/templates/launchpad-db-lazr.conf`. It won't hurt since the default in the charm is the same as the default in the config schema, and it'll save a bit of work in the PPA publisher charm.

review: Approve
0796916... by Ines Almeida

Add storm_cache_size param to launchpad-db-lazr.conf

Revision history for this message
Ines Almeida (ines-almeida) wrote :

Agree. Updated the launchpad-db-lazr

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/launchpad-db/config.yaml b/launchpad-db/config.yaml
2index cd088e2..361e060 100644
3--- a/launchpad-db/config.yaml
4+++ b/launchpad-db/config.yaml
5@@ -10,3 +10,7 @@ options:
6 type: int
7 description: SQL statement timeout in milliseconds.
8 default:
9+ storm_cache_size:
10+ type: int
11+ default: 10000
12+ description: The size of the Storm cache in objects.
13diff --git a/launchpad-db/templates/launchpad-db-lazr.conf b/launchpad-db/templates/launchpad-db-lazr.conf
14index e6f4f80..5cfa4fa 100644
15--- a/launchpad-db/templates/launchpad-db-lazr.conf
16+++ b/launchpad-db/templates/launchpad-db-lazr.conf
17@@ -16,4 +16,5 @@ extends: launchpad-base-lazr.conf
18 rw_main_primary: {{ db_primary }}
19 rw_main_standby: {{ db_standby or db_primary }}
20 set_role_after_connecting: True
21+storm_cache_size: {{ storm_cache_size }}
22

Subscribers

People subscribed via source and target branches