Comments (3)
[removed previous comment]
The function is 2 folds, with 2 requests, in order to remove jobs with any resource that is Dead/Suspected/Absent.
In one request, I think we could do:
SELECT g2.moldable_job_id, g1.resource_id, j.job_id
FROM gantt_jobs_resources g1, gantt_jobs_predictions g2, jobs j, moldable_job_descriptions m, resources r
WHERE
m.moldable_index = \'CURRENT\'
AND g1.moldable_job_id = g2.moldable_job_id
AND m.moldable_id = g1.moldable_job_id
AND j.job_id = m.moldable_job_id
AND g2.start_time <= $date
AND j.state = \'Waiting\'
AND r.resource_id = g1.resource_id
AND r.state = \'Alive\'
AND NOT EXISTS (
SELECT 1
FROM resources rr, gantt_jobs_resources g
WHERE g.moldable_job_id = g1.moldable_job_id
AND rr.resource_id = g.resource_id
AND ( rr.state IN (\'Dead\',\'Suspected\',\Absent\')
OR rr.next_state IN (\'Dead\',\'Suspected\',\Absent\') )
)
To test ?
from oar.
[updated the request above]
from oar.
As reported by @capitn, having "m.moldable_index = 'CURRENT'" in the where clause actually slows down pgsql.
Fixed in 3e60532, but use the new code with the single query (with "exists in").
from oar.
Related Issues (20)
- Job containers should be killed when no inner job for some time HOT 1
- Table "assigned_resources" may be inconsistent, leading to phoenix ignoring some nodes
- Monika security issue (SQL injection) HOT 1
- Join stdout stderr option HOT 1
- Rest API issue when submitting job with specific directory HOT 1
- Add "session" id in the debug log of every modules HOT 1
- oarsub and working directory HOT 2
- Typos in oardel manpage HOT 1
- Identify which oar.conf setting is necessary on which of frontend/server/nodes HOT 1
- OAR does not export environment variables to all nodes in the reservation HOT 5
- HOLD status on new job and OARSTAT
- job_resource_manager_cgroups: Nvidia devices not hidden for the first job after boot HOT 2
- Missing index on 'resubmit_job_id' for 'jobs' table
- Tag OAR Resources HOT 1
- Documentation - Add OS prerequisites for OAR components HOT 1
- rest api: filters ignored for computing the "total" in /jobs or /jobs/details
- Support of cgroupsv2 by OAR ? HOT 1
- Precisions about Enable_mem_cg variable
- Scheduler_priority : different behavior between -l and OR HOT 1
- php8 changes break drawgantt-svg HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oar.