When direct reads ("bypass mode") are in use, the code was failing to increment the number of bytes serviced in the read request. When there were no errors, that means the overall read operation returned 0 instead of the bytes read.
This resulted in 100% failure rate for HTTP requests when direct read mode was activated.
This was tested by disabling prefetch and then always forcing direct reads via this simple patch:
--- a/src/XrdPfc/XrdPfcFile.cc
+++ b/src/XrdPfc/XrdPfcFile.cc
@@ -804,7 +804,7 @@ int File::ReadOpusCoalescere(IO *io, const XrdOucIOVec *readV, int readVnum,
read_req = new ReadRequest(io, rh);
// Is there room for one more RAM Block?
- Block *b = PrepareBlockRequest(block_idx, io, read_req, false);
+ Block *b = nullptr; // = PrepareBlockRequest(block_idx, io, read_req, false);
if (b)
{
TRACEF(Dump, tpfx << "inc_ref_count new " << (void*)iUserBuff << " idx = " << block_idx);
Before -- HTTP requests would hang 100% of the time. After -- everything worked.
https://github.com/xrootd/xrootd/pull/1918
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Use REPLY-ALL to reply to list
To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1