NodeResult websocket queries scale linearly due to history
Bug #1752754 reported by
Lee Trager
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Lee Trager | ||
2.3 |
Fix Committed
|
Critical
|
Unassigned |
Bug Description
The NodeResult websocket returns ScriptResult information. Part of the metadata sent over the websocket is historic results. While the websocket can retrieve the latest ScriptResults in a constant number of queries getting the historic results requires one query per ScriptResult. Thus the current query count is 3 + n.
Historic results are not seen by default on any page in MAAS. These results could be retrieved using a separate websocket function. This will reduce the load on the region and database when viewing ScriptResults.
Related branches
~ltrager/maas:2.3_1752754
- Blake Rouse (community): Approve
-
Diff: 415 lines (+189/-40)9 files modifiedsrc/maasserver/static/js/angular/controllers/node_results.js (+21/-10)
src/maasserver/static/js/angular/controllers/tests/test_node_results.js (+46/-0)
src/maasserver/static/js/angular/factories/node_results.js (+10/-1)
src/maasserver/static/js/angular/factories/tests/test_node_results.js (+22/-1)
src/maasserver/static/partials/script-results-list.html (+7/-1)
src/maasserver/websockets/handlers/node_result.py (+21/-12)
src/maasserver/websockets/handlers/tests/test_node_result.py (+32/-11)
src/metadataserver/models/scriptresult.py (+4/-2)
src/metadataserver/models/tests/test_scriptresult.py (+26/-2)
~ltrager/maas:history_ws_func
Merged
into
maas:master
- Blake Rouse (community): Approve
- MAAS Lander: Approve
-
Diff: 414 lines (+188/-43)9 files modifiedsrc/maasserver/static/js/angular/controllers/node_results.js (+21/-10)
src/maasserver/static/js/angular/controllers/tests/test_node_results.js (+46/-0)
src/maasserver/static/js/angular/factories/node_results.js (+10/-1)
src/maasserver/static/js/angular/factories/tests/test_node_results.js (+22/-1)
src/maasserver/static/partials/script-results-list.html (+6/-3)
src/maasserver/websockets/handlers/node_result.py (+21/-13)
src/maasserver/websockets/handlers/tests/test_node_result.py (+32/-11)
src/metadataserver/models/scriptresult.py (+4/-2)
src/metadataserver/models/tests/test_scriptresult.py (+26/-2)
Changed in maas: | |
importance: | Medium → High |
tags: | added: performance |
Changed in maas: | |
milestone: | 2.4.x → 2.4.0beta1 |
importance: | High → Critical |
Changed in maas: | |
assignee: | nobody → Lee Trager (ltrager) |
Changed in maas: | |
status: | Triaged → Won't Fix |
status: | Won't Fix → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.