Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
ece616b0
Commit
ece616b0
authored
6 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
SW-41
: no special case for resource 117 anymore
parent
5a1dc1cb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/ResourceAssignment/ResourceAssignmentDatabase/radb/sql/add_functions_and_triggers.sql
+28
-36
28 additions, 36 deletions
...ssignmentDatabase/radb/sql/add_functions_and_triggers.sql
with
28 additions
and
36 deletions
SAS/ResourceAssignment/ResourceAssignmentDatabase/radb/sql/add_functions_and_triggers.sql
+
28
−
36
View file @
ece616b0
...
...
@@ -896,17 +896,14 @@ BEGIN
--update the resource usages affected by this claim
--do this before we check for conflicts, because this claim might be shifted for example
--which might influence the resource_usages which determine wheter a claim fits.
IF
OLD
.
resource_id
<>
117
THEN
--20180903: skip checking of cep4 storage until JIRA SW-35 is solved.
PERFORM
resource_allocation
.
process_old_claim_outof_resource_usages
(
OLD
);
END
IF
;
END
IF
;
--only check claim if status and/or claim_size and/or start/end time changed
IF
TG_OP
=
'INSERT'
OR
(
TG_OP
=
'UPDATE'
AND
(
OLD
.
status_id
<>
NEW
.
status_id
OR
OLD
.
claim_size
<>
NEW
.
claim_size
OR
OLD
.
starttime
<>
NEW
.
starttime
OR
OLD
.
endtime
<>
NEW
.
endtime
))
THEN
IF
NEW
.
resource_id
<>
117
THEN
--20180903: skip checking of cep4 storage until JIRA SW-35 is solved.
--check if claim fits or has conflicts
SELECT
*
FROM
resource_allocation
.
has_conflict_with_overlapping_claims
(
NEW
)
INTO
claim_has_conflicts
;
...
...
@@ -927,7 +924,6 @@ BEGIN
NEW
.
status_id
:
=
claim_tentative_status_id
;
END
IF
;
END
IF
;
END
IF
;
IF
TG_OP
=
'INSERT'
OR
TG_OP
=
'UPDATE'
THEN
--update the resource usages affected by this claim
...
...
@@ -1002,7 +998,6 @@ BEGIN
AND
rc
.
endtime
>=
OLD
.
starttime
AND
rc
.
starttime
<
OLD
.
endtime
LOOP
IF
affected_claim
.
resource_id
<>
117
THEN
--20180903: skip checking of cep4 storage until JIRA SW-35 is solved.
--check if claim fits or has conflicts
SELECT
*
FROM
resource_allocation
.
has_conflict_with_overlapping_claims
(
affected_claim
)
INTO
claim_has_conflicts
;
...
...
@@ -1010,7 +1005,6 @@ BEGIN
-- no conflict (anymore) with others, so set claim status to tentative
UPDATE
resource_allocation
.
resource_claim
SET
status_id
=
claim_tentative_status_id
WHERE
id
=
affected_claim
.
id
;
END
IF
;
END
IF
;
END
LOOP
;
END
IF
;
...
...
@@ -1025,7 +1019,6 @@ BEGIN
AND
rc
.
endtime
>=
NEW
.
starttime
AND
rc
.
starttime
<
NEW
.
endtime
LOOP
IF
affected_claim
.
resource_id
<>
117
THEN
--20180903: skip checking of cep4 storage until JIRA SW-35 is solved.
--check if claim fits or has conflicts
SELECT
*
FROM
resource_allocation
.
has_conflict_with_overlapping_claims
(
affected_claim
)
INTO
claim_has_conflicts
;
...
...
@@ -1033,7 +1026,6 @@ BEGIN
-- new conflict for affected_claim because this NEW claim is now claimed
UPDATE
resource_allocation
.
resource_claim
SET
status_id
=
claim_conflict_status_id
WHERE
id
=
affected_claim
.
id
;
END
IF
;
END
IF
;
END
LOOP
;
END
IF
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment