Commit fa77e609 authored by Marian Babik's avatar Marian Babik
Browse files

Merge branch 'xrd_read_timeout' into 'master'

xrootd endpoint: Increase the read() request timeout from 30 to 90 seconds

See merge request !16
parents 803b9e03 8067e68d
......@@ -901,9 +901,9 @@ def probe_read(args, io):
"rc=%d") % status.shellcode)
return
#
status, data = f.read(offset=0, size=65536, timeout=30)
status, data = f.read(offset=0, size=65536, timeout=90)
if ( not status.ok ):
io.write(("\n%s\nread(offset=0, size=65536, timeout=30)\n" + \
io.write(("\n%s\nread(offset=0, size=65536, timeout=90)\n" + \
"XRootDStatus.code=%d \"%s\"\n") % (filename, \
status.code, status.message.replace("\n", "")))
io.set_status(nap.CRITICAL, "failed to read file block 0")
......@@ -919,13 +919,14 @@ def probe_read(args, io):
#
rndm = random.randint(1, file['blck'] - 1)
#
status, data = f.read(offset=rndm*65536, size=65536, timeout=30)
status, data = f.read(offset=rndm*65536, size=65536, timeout=90)
if ( not status.ok ):
io.write(("\n%s\nread(offset=%d, size=65536, timeout=30)\n" + \
io.write(("\n%s\nread(offset=%d, size=65536, timeout=90)\n" + \
"XRootDStatus.code=%d \"%s\"\n") % \
(filename, rndm*65536, status.code, \
status.message.replace("\n", "")))
io.set_status(nap.CRITICAL, "failed to read file block %d")
io.set_status(nap.CRITICAL, "failed to read file block %d" % \
rndm)
return
#
chk73c = CSXE_ASCII73CODE[ (zlib.adler32(data) & 0xffffffff) % 73 ]
......@@ -1017,7 +1018,7 @@ if __name__ == '__main__':
sys.exit()
#
blk = 0
status, data = f.read(offset=0, size=65536, timeout=30)
status, data = f.read(offset=0, size=65536, timeout=90)
chksum = hex(zlib.adler32(data) & 0xffffffff)[2:]
sys.stdout.write(" 'adlr':\"%s\",\n" % chksum)
while ( status.ok ):
......@@ -1035,7 +1036,7 @@ if __name__ == '__main__':
sys.stdout.write('%s' % chk73c)
blk += 1
status, data = f.read(offset=blk*65536, size=65536,
timeout=30)
timeout=90)
if ( blk >= file['blck'] ):
sys.stdout.write("\"},")
......
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