Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
c19772ef
Commit
c19772ef
authored
May 10, 2021
by
Michael Davis
Browse files
[migration-tools] Don't import metadata for zero-length files into CTA Catalogue
parent
323f5e00
Changes
1
Hide whitespace changes
Inline
Side-by-side
migration/oracle_catalogue_castor_migration.sql
View file @
c19772ef
...
...
@@ -318,18 +318,19 @@ BEGIN
IF
var2ndTapePool
IS
NOT
NULL
THEN
importTapePool
(
var2ndTapePool
,
inVO_id
);
END
IF
;
-- import metadata into the CTA catalogue
populateCTAFilesFromCASTOR
(
inEOSCTAInstance
,
varTapePool
,
inVO_id
);
IF
inDryRun
=
0
THEN
CNS_ctaLog
(
varTapePool
,
'CASTOR metadata import completed successfully'
);
ELSE
CNS_ctaLog
(
varTapePool
,
'CASTOR metadata import completed successfully [dry-run mode]'
);
END
IF
;
ELSE
-- 0-byte files are special as they do not belong to any tape pool
CNS_zeroByteFilesForCTAExport
(
inVO
);
-- extract all directories metadata as above
CNS_dirsForCTAExport
(
varTapePool
);
END
IF
;
-- import metadata into the CTA catalogue
populateCTAFilesFromCASTOR
(
inEOSCTAInstance
,
varTapePool
,
inVO_id
);
IF
inDryRun
=
0
THEN
CNS_ctaLog
(
varTapePool
,
'CASTOR metadata import completed successfully'
);
ELSE
CNS_ctaLog
(
varTapePool
,
'CASTOR metadata import completed successfully [dry-run mode]'
);
CNS_ctaLog
(
varTapePool
,
'CASTOR zero-length file metadata imported successfully'
);
END
IF
;
EXCEPTION
WHEN
OTHERS
THEN
-- any error is logged and raised to the caller
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment