Commit 43edc9d3 authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

[migration] Catch early the trivial case of empty or non-existent tape pool

parent 223491ef
......@@ -108,6 +108,9 @@ BEGIN
);
COMMIT;
SELECT COUNT(*) INTO nbFiles FROM CTAFilesHelper;
IF nbFiles = 0 THEN
raise_application_error(-20000, 'No valid files found on this tape pool, aborting the import');
END IF;
ctaLog(inPoolName, 'Intermediate table for files prepared, '|| nbFiles ||' files to be imported. ETA: '||
prettyTime(nbFiles/7000/60));
EXECUTE IMMEDIATE 'TRUNCATE TABLE CTADeltaDirsHelper';
......
Supports Markdown
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