Commit c19772ef authored by Michael Davis's avatar Michael Davis
Browse files

[migration-tools] Don't import metadata for zero-length files into CTA Catalogue

parent 323f5e00
......@@ -318,12 +318,6 @@ BEGIN
IF var2ndTapePool IS NOT NULL THEN
importTapePool(var2ndTapePool, inVO_id);
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
......@@ -331,6 +325,13 @@ BEGIN
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);
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
CNS_ctaLog(varTapePool, 'Exception caught, terminating import: '|| SQLERRM ||' '|| dbms_utility.format_error_backtrace());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment