Skip to content
Snippets Groups Projects
Commit 5448794b authored by Steven Murray's avatar Steven Murray
Browse files

CASTOR-5101 The tapegateway PL/SQL procedure tg_setFileMigrated() does not...

CASTOR-5101 The tapegateway PL/SQL procedure tg_setFileMigrated() does not handle deleted migration jobs

Removed paranoid code that tried to delete left over migration segments.
There simply shouldn't be any!
parent af53389a
Branches
Tags
No related merge requests found
......@@ -1659,18 +1659,6 @@ BEGIN
-- If there was no migration job to delete
IF 0 = varNbJobsDeleted THEN
-- check if another migration should be performed
SELECT /*+ INDEX_RS_ASC(MigrationJob I_MigrationJob_CFVID) */
count(*) INTO varMigJobCount
FROM MigrationJob
WHERE castorFile = varCfId;
IF varMigJobCount = 0 THEN
-- no more migrations, delete all migrated segments
DELETE FROM MigratedSegment
WHERE castorFile = varCfId;
END IF;
-- log an explanation and return
-- this is not an error, a migration job can be deleted before it is completed
varParams := 'mountTransactionId='|| to_char(inMountTrId) || ' ' || inLogContext;
......
......@@ -241,18 +241,6 @@ BEGIN
-- If there was no migration job to delete
IF 0 = varNbJobsDeleted THEN
-- check if another migration should be performed
SELECT /*+ INDEX_RS_ASC(MigrationJob I_MigrationJob_CFVID) */
count(*) INTO varMigJobCount
FROM MigrationJob
WHERE castorFile = varCfId;
IF varMigJobCount = 0 THEN
-- no more migrations, delete all migrated segments
DELETE FROM MigratedSegment
WHERE castorFile = varCfId;
END IF;
-- log an explanation and return
-- this is not an error, a migration job can be deleted before it is completed
varParams := 'mountTransactionId='|| to_char(inMountTrId) || ' ' || inLogContext;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment