Skip to content
Snippets Groups Projects
Commit cc74fa5d authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

Handle transferids uniformly in the moverhandler as xroot internal transfers now also have a UUID

parent 2b0d412d
Branches
Tags
No related merge requests found
......@@ -58,7 +58,7 @@ class MoverReqHandlerThread(threading.Thread):
where errorCode is non-0 in case the transfer is to be cancelled
tident has the format: username.clientPid:fd@clientHost
transferType is one of tape, user, d2duser, d2dinternal, d2ddraining, d2drebalance
transferId is the UUID of the transfer or 0 for non-user transfers
transferId is the UUID of the transfer
- It synchronously waits for a single answer like
<rc>[ <error message>]\n
either "0" for success
......@@ -76,7 +76,7 @@ class MoverReqHandlerThread(threading.Thread):
# yes, look it up for this transferid
t = self.runningTransfers.get(transferid)
if errCode != 0:
# this is a user transfer that has to be failed
# this is a user transfer that has to be failed as we got an error from xroot
self.runningTransfers.remove(t)
self.runningTransfers.failTransfer(t.scheduler, t.transfer, errCode, 'Error while opening the file')
else:
......@@ -94,7 +94,7 @@ class MoverReqHandlerThread(threading.Thread):
nshost = nshost.split('.')[0]
fileid = (nshost, int(fid))
mountPoint = physicalPath.rsplit(os.sep, 2)[0] + os.sep
tTransfer = TapeTransfer(tident + ':' + physicalPath, # this is a unique identifier for a tape transfer
tTransfer = TapeTransfer(transferid, # this UUID has been generated by xroot
TapeTransferType.RECALL if isWriteFlag else TapeTransferType.MIGRATION,
time.time(), clientHost, fileid, mountPoint)
self.runningTransfers.addTapeTransfer(tTransfer)
......
......@@ -41,7 +41,7 @@ extern "C" {
* (tident, physicalPath, transferType, isWriteFlag, transferId)
* where tident has the format: username.clientPid:fd@clientHost
* and transferType is one of tape, user, d2duser, d2dinternal, d2ddraining, d2redbalance
* and transferId is the UUID of the transfer, 0 for non-user transfers
* and transferId is the UUID of the transfer
* errorcode an error code to be passed in case of a failure; it may be filled
with a non-zero value when the operation fails
* errormsg a pointer to a buffer for the error message if the operation failed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment