Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading