Rally should not overwrite pre existing templates by default
- Dominant language
- Python
- Stars
- 2k
- Forks
- 347
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 5
Description
Originally a decision was made that rally should always update existing index templates - the reasoning was that the fields in the index could well be updated regularly. We are now in a position where we have a stable layout for the index templates, thus we should now change to only writing templates if they don't already exist, or if a user specifically says they want them overwritten.
The reasoning behind that is it will allow users to set custom lifecycle policies for moving data to frozen and more.
Suggested implementation:
- Check if the index template exists.
- If it does, and the user has not set a new setting - `overwrite_existing_templates` to true in the [reporting] section of rally.ini, then do not do anything
- If the template does not exist we should create the templates
Where we update index template: https://github.com/elastic/rally/blob/master/esrally/metrics.py#L902
Contributor guide
Research direction
Start in esrally/metrics.py around line 902, where Rally updates index templates, and trace how reporting settings are read from rally.ini. Verify the existing-template and overwrite_existing_templates cases, then run the relevant test suite to confirm new templates are created while existing ones remain unchanged unless explicitly overwritten.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100