Skip to content
GitLab
Menu
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
22d62aac
Commit
22d62aac
authored
Jul 11, 2014
by
Giuseppe Lo Presti
Browse files
Fixed #104892: Concurrent repack of dual copy files does not generate two racing recall jobs
parent
d55aee9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
castor/db/oracleRepack.sql
View file @
22d62aac
...
...
@@ -247,10 +247,11 @@ BEGIN
AND
DiskServer
.
hwOnline
=
1
AND
DC
.
status
=
dconst
.
DISKCOPY_VALID
;
IF
varNbCopies
=
0
THEN
-- find out whether this file is already being recalled
SELECT
count
(
*
)
INTO
varWasRecalled
FROM
RecallJob
WHERE
castorfile
=
cfId
AND
ROWNUM
<
2
;
-- find out whether this file is already being recalled
from this tape
SELECT
count
(
*
)
INTO
varWasRecalled
FROM
RecallJob
WHERE
castorfile
=
cfId
AND
vid
!=
varRepackVID
;
IF
varWasRecalled
=
0
THEN
-- trigger recall
-- trigger recall: if we have dual copy files, this may trigger a second recall,
-- which will race with the first as it happens for user-driven recalls
triggerRepackRecall
(
cfId
,
segment
.
fileid
,
nsHostName
,
segment
.
blockid
,
segment
.
fseq
,
segment
.
copyNb
,
varEuid
,
varEgid
,
varRecallGroupId
,
svcClassId
,
varRepackVID
,
segment
.
segSize
,
...
...
castor/db/oracleTapeGateway.sql
View file @
22d62aac
...
...
@@ -882,7 +882,6 @@ BEGIN
WHERE
SR
.
castorFile
=
inCfId
AND
SR
.
status
IN
(
dconst
.
SUBREQUEST_WAITTAPERECALL
,
dconst
.
SUBREQUEST_WAITSUBREQ
);
END
IF
;
-- commit
COMMIT
;
END
;
/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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