Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
dCache
cta
Commits
da40f6e8
Commit
da40f6e8
authored
16 years ago
by
Giuseppe Lo Presti
Browse files
Options
Downloads
Patches
Plain Diff
Putting back restartStuckRecalls procedure and job
parent
a009fd89
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
castor/db/oracleGC.sql
+29
-3
29 additions, 3 deletions
castor/db/oracleGC.sql
with
29 additions
and
3 deletions
castor/db/oracleGC.sql
+
29
−
3
View file @
da40f6e8
/*******************************************************************
*
* @(#)$RCSfile: oracleGC.sql,v $ $Revision: 1.68
4
$ $Date: 2009/03/05 1
1:55:10
$ $Author: itglp $
* @(#)$RCSfile: oracleGC.sql,v $ $Revision: 1.68
5
$ $Date: 2009/03/05 1
4:13:55
$ $Author: itglp $
*
* PL/SQL code for stager cleanup and garbage collecting
*
...
...
@@ -558,7 +558,7 @@ BEGIN
END
IF
;
-- delete castorFiles if nothing is left for them. Here we use
-- a temporary table as we need to commit every ~1000
0
operations
-- a temporary table as we need to commit every ~1000 operations
-- and keeping a cursor opened on the original select may take
-- too long, leading to ORA-01555 'snapshot too old' errors.
EXECUTE
IMMEDIATE
'TRUNCATE TABLE DeleteTermReqHelper'
;
...
...
@@ -711,6 +711,20 @@ END;
/
/* Deal with stuck recalls - this workaround should be dropped
after rtcpclientd is reviewed */
CREATE
OR
REPLACE
PROCEDURE
restartStuckRecalls
AS
BEGIN
UPDATE
Segment
SET
status
=
0
WHERE
status
=
7
and
tape
IN
(
SELECT
id
from
Tape
WHERE
tpmode
=
0
AND
status
IN
(
0
,
6
)
AND
id
IN
(
SELECT
tape
FROM
Segment
WHERE
status
=
7
));
UPDATE
Tape
SET
status
=
1
WHERE
tpmode
=
0
AND
status
IN
(
0
,
6
)
AND
id
IN
(
SELECT
tape
FROM
Segment
WHERE
status
in
(
0
,
7
));
COMMIT
;
END
;
/
/* Runs cleanup operations */
CREATE
OR
REPLACE
PROCEDURE
cleanup
AS
t
INTEGER
;
...
...
@@ -749,7 +763,8 @@ BEGIN
FOR
j
IN
(
SELECT
job_name
FROM
user_scheduler_jobs
WHERE
job_name
IN
(
'HOUSEKEEPINGJOB'
,
'CLEANUPJOB'
,
'BULKCHECKFSBACKINPRODJOB'
))
'BULKCHECKFSBACKINPRODJOB'
,
'RESTARTSTUCKRECALLSJOB'
))
LOOP
DBMS_SCHEDULER
.
DROP_JOB
(
j
.
job_name
,
TRUE
);
END
LOOP
;
...
...
@@ -786,6 +801,17 @@ BEGIN
REPEAT_INTERVAL
=>
'FREQ=MINUTELY; INTERVAL=5'
,
ENABLED
=>
TRUE
,
COMMENTS
=>
'Bulk operation to processing filesystem state changes'
);
-- Create a db job to be run every hour executing the restartStuckRecalls workaround procedure
DBMS_SCHEDULER
.
CREATE_JOB
(
JOB_NAME
=>
'restartStuckRecallsJob'
,
JOB_TYPE
=>
'PLSQL_BLOCK'
,
JOB_ACTION
=>
'BEGIN restartStuckRecalls(); END;'
,
JOB_CLASS
=>
'CASTOR_JOB_CLASS'
,
START_DATE
=>
SYSDATE
+
60
/
1440
,
REPEAT_INTERVAL
=>
'FREQ=MINUTELY; INTERVAL=60'
,
ENABLED
=>
TRUE
,
COMMENTS
=>
'Workaround to restart stuck recalls'
);
END
;
/
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