Skip to content

Commit

Permalink
Merge pull request #19348 from jakesmith/HPCC-33100-dafilesrv-stream-…
Browse files Browse the repository at this point in the history
…recovery-fix

HPCC-33100 Fix data loss, streaming from dafilesrv and network failure.

Reviewed-by: Mark Kelly [email protected]
Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Dec 11, 2024
2 parents 1caf985 + ee42588 commit e8a4854
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions fs/dafsclient/rmtfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2316,9 +2316,19 @@ class CRemoteFilteredFileIOBase : public CRemoteBase, implements IRemoteFileIO
mrequest.append((RemoteFileCommandType)RFCStreamRead);
VStringBuffer json("{ \"handle\" : %u, \"format\" : \"binary\" }", handle);
mrequest.append(json.length(), json.str());
sendRemoteCommand(mrequest, newReply);
unsigned newHandle;
newReply.read(newHandle);
unsigned newHandle = 0;
try
{
sendRemoteCommand(mrequest, newReply, false);
newReply.read(newHandle);
}
catch (IJSOCK_Exception *e)
{
// will trigger new request with cursor
EXCLOG(e, "CRemoteFilteredFileIOBase:: socket failure whilst streaming, will attempt to reconnect with cursor");
newHandle = 0;
e->Release();
}
if (newHandle == handle)
{
reply.swapWith(newReply);
Expand Down

0 comments on commit e8a4854

Please sign in to comment.