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
c1b520be
Commit
c1b520be
authored
11 years ago
by
Giuseppe Lo Presti
Browse files
Options
Downloads
Patches
Plain Diff
Improved post-upgrade scripts after tests
parent
9133d964
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
upgrades/cns_2.1.14-2_post-upgrade.sql
+10
-7
10 additions, 7 deletions
upgrades/cns_2.1.14-2_post-upgrade.sql
upgrades/cns_2.1.14_switch-open-mode.sql
+2
-5
2 additions, 5 deletions
upgrades/cns_2.1.14_switch-open-mode.sql
with
12 additions
and
12 deletions
upgrades/cns_2.1.14-2_post-upgrade.sql
+
10
−
7
View file @
c1b520be
...
...
@@ -39,20 +39,23 @@ EXCEPTION WHEN NO_DATA_FOUND THEN
END
;
/
/* Create a dedicated index to speed up the job. This takes ~2
0
minutes. */
CREATE
INDEX
I_fmd_stagertime_null
ON
Cns_file_metadata
(
decode
(
nvl
(
stagertime
,
1
),
1
,
1
,
NULL
));
/* Create a dedicated index to speed up the job. This takes ~2
5
minutes.
ONLINE makes this intervention transparent.
*/
CREATE
INDEX
I_fmd_stagertime_null
ON
Cns_file_metadata
(
decode
(
nvl
(
stagertime
,
1
),
1
,
1
,
NULL
))
ONLINE
;
/* Create a temporary procedure for updating the new metadata on all files. */
CREATE
OR
REPLACE
PROCEDURE
updateAll2114Data
AS
stop
BOOLEAN
:
=
FALSE
;
BEGIN
LOOP
-- go for a run of 10,000 files. This takes about 15 seconds
WHILE
NOT
stop
LOOP
stop
:
=
TRUE
;
-- go for a run of 100,000 files: this takes about 8 minutes
FOR
f
IN
(
SELECT
/*+ INDEX(f I_fmd_stagertime_null) INDEX_RS_ASC(s pk_s_fileid) */
fileid
,
mtime
,
f
.
gid
FROM
Cns_file_metadata
f
,
Cns_seg_metadata
s
WHERE
f
.
fileid
=
s
.
s_fileid
AND
decode
(
nvl
(
f
.
stagertime
,
1
),
1
,
1
,
NULL
)
=
1
AND
ROWNUM
<=
10000
)
LOOP
AND
ROWNUM
<=
100000
)
LOOP
stop
:
=
FALSE
;
UPDATE
Cns_file_metadata
SET
stagerTime
=
mtime
WHERE
fileid
=
f
.
fileid
;
...
...
@@ -69,8 +72,8 @@ BEGIN
END
;
/
/* Create a job to run the above procedure.
* This is expected to take
~30,000 runs or ~5 day
s with 300M files.
/* Create a
one-off
job to run the above procedure.
* This is expected to take
about two week
s with 300M files.
*/
DECLARE
jobno
NUMBER
;
...
...
This diff is collapsed.
Click to expand it.
upgrades/cns_2.1.14_switch-open-mode.sql
+
2
−
5
View file @
c1b520be
...
...
@@ -61,15 +61,12 @@ UPDATE CastorConfig SET value = 'N' WHERE class = 'stager' AND key = 'openmode';
COMMIT
;
-- not needed any longer
BEGIN
DBMS_SCHEDULER
.
DROP_JOB
(
'updateAll2114DataJob'
,
TRUE
);
END
;
/
DROP
PROCEDURE
updateAll2114Data
;
DROP
INDEX
I_fmd_stagertime_null
;
CREATE
OR
REPLACE
PROCEDURE
update2114Data
(
inVid
IN
VARCHAR2
)
AS
BEGIN
-- no op, to be dropped on next release
-- no op, to be dropped on next release once its call
-- is removed from handleRepackRequest() in the Stager DB
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