Skip to content

Client fix - #37

Open
Hujiabei1997 wants to merge 6 commits into
EMCECS:masterfrom
Hujiabei1997:client-fix
Open

Hujiabei1997 wants to merge 6 commits into
EMCECS:masterfrom
Hujiabei1997:client-fix

Conversation

@Hujiabei1997

@Hujiabei1997 Hujiabei1997 commented Nov 4, 2021

Copy link
Copy Markdown

When using nfs-client to transfer a file greater than 1024 * 1024, the following error occurs:
Tcp IO error on the connection,the reason for this may be that the pipeline reader is closed, BROKEN PIPE error is generated, and Tcp IO error exception is thrown. Because the server source code is not clear, my guess about this problem is as follows:
In channel.write (), the CompositeChannelBuffer is sent as a message. The size of the message is limited to 1024 * 1024 on the server, while in NfsFileOutputStream, __ buffer_ is the byte array that actually stores the data (size 1024 * 1024), which must be filled before the data is sent.
But,message = metadata + data.
So one possibility is that the server limits the size of an overall message, while message contains metadata, so the actual data carried can only be less than 1024 * 1024.
So I think one way to solve bug is to adjust the default size of __ buffer_:
__ buffer = new byte [(int) Math.min (_ nfsFile.fsinfo () .getFsInfo () .wtpref, Integer.MAX_VALUE)-bufferSize]_.
Set aside some space for metadata storage to ensure that the whole message is not greater than 1024 * 1024

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant