-
Notifications
You must be signed in to change notification settings - Fork 183
[9.0] feat: use summary tables and triggers #8199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: integration
Are you sure you want to change the base?
Conversation
b98978f
to
f32b961
Compare
abc0efc
to
aaadeea
Compare
86a7cc4
to
d263910
Compare
d4d430d
to
f492bc0
Compare
if "Monitoring" in self.pilotMonitoringOption: | ||
self.log.info("Committing PilotsHistory to Monitoring") | ||
result = PilotAgentsDB().getSummarySnapshot() | ||
sql = "SELECT * FROM PilotsHistorySummary ORDER BY GridSite, DestinationSite, Status, VO;" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why writing the query directly here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it is the only place where we need it and I did not want to create a new method in the DB class. I understand it's not very elegant, but it's simpler and anyway DIRAC will keep using these hand-written queries for MySQL only.
Return Distinct Values of Owner job Attribute in WMS | ||
""" | ||
return cls.jobDB.getDistinctJobAttributes("Owner", condDict, older, newer) | ||
return cls.jobDB._query("SELECT DISTINCT Owner FROM JobsHistorySummary") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure that there is any benefit in these changes, given that the Job table has an index on all these parameters. I just tried on the LHCb production instance, it returns the answer in 0.021s for Owner for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will probably be even less for the summary table. I agree with you that it's minor improvement anyway.
|
||
-- summary for JobsHistory | ||
|
||
DROP TABLE IF EXISTS `JobsHistorySummary`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the operational point of view, how do you see that happening ? You need to fill in that table with an initial content representing the current state. That will take for ever and require a downtime no ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For everyone but LHCb this is just one more thing to be done during the update downtime.
For LHCb:
- the current query (which is what you would theoretically want to do) takes at most 15 minutes, not "for ever"
- But anyway, I have something in mind to avoid that, but no need to write it down here.
655119a
to
581f099
Compare
10759e7
to
e33c0bb
Compare
…aries for StatesAccounting) F
BEGINRELEASENOTES
*WMS
NEW: added tables of summaries and triggers to fill their content
ENDRELEASENOTES