Closed
Bug 1340505
Opened 8 years ago
Closed 6 years ago
Handle data expiration from Elasticsearch in a performant way
Categories
(Tree Management :: Treeherder: Infrastructure, defect, P3)
Tree Management
Treeherder: Infrastructure
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: emorley, Unassigned)
References
(Blocks 1 open bug)
Details
Currently there is some logic to expire data from Elasticsearch in cycle_data:
https://github.com/mozilla/treeherder/blob/0be124da15ca89ece8ca538c84b9760ee84671a1/treeherder/model/models.py#L615-L633
...however:
1) This isn't running on stage/prod (since ES isn't being used there yet), so might not even work any more (or be too slow)
2) It makes the expiring of job/failure line data more complicated than it need be
Alternative implementations might be:
(a) Use Elasticsearch's TTL (https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping-ttl-field.html ; albeit deprecated)
(b) Use time based ES indexes (https://www.elastic.co/guide/en/elasticsearch/guide/current/retiring-data.html)
(c) Use the Django pre_delete signal to automatically remove ES entries when the corresponding FailureLine row is removed (https://docs.djangoproject.com/en/1.10/ref/signals/#pre-delete(
At first glance it seems like (b) would be preferable/more performant.
Whilst I'm fine with not expiring data from ES when bug 1321798 initially lands, I'd like to ensure we've at least thought about data expiration before it becomes much harder to change the data structures in ES.
| Reporter | ||
Updated•8 years ago
|
| Reporter | ||
Updated•6 years ago
|
Priority: P2 → P3
Comment 2•6 years ago
|
||
We talked about this in the TH meeting. I'm not experienced with ES, but I'm fairly sure it's vestigial since we mothballed Autoclassify.
Flags: needinfo?(cdawson)
Comment 3•6 years ago
|
||
jgraham: I'm trying to understand if we have an ElasticSearch instance for Treeherder. Do you know?
Is it time to remove the code?
Comment 4•6 years ago
|
||
I'm bringing the conversation to the mailing list:
https://groups.google.com/forum/#!topic/mozilla.tools.treeherder/-Dgulh0-Tng
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•