Closed sonic0002 closed 5 years ago
any update on this? @kolo @miracle2k
Seems like we should be setting rpc.Response.Error
instead of returning it.
@kolo does implementing net/rcp.ClientCodec
actually buy us anything? It seems like it's forcing us to re-invent logic that http.Client
already implements.
@icholy agreed
Seems like we should be setting
rpc.Response.Error
instead of returning it.
This error would block all the following requests and you have to close the current client and start a new one. Think this is not an ideal solution.
cc @harrycmfan
@sonic0002 can you try the error_handling branch?
@icholy implementing net/rpc.ClientCodec
doesn't give much. Initially (7 years ago) I thought it would be nice to implement it but now I don't see any benefit of doing that. It was one of the reasons why proper multicall wasn't implemented for example.
I'm not sure though how Client
is used. Does anyone ever use interface over actual type? This is the question without an answer for me.
@kolo I guess writing code that uses rcp.Client
lets you swap out codecs without changing your client code. But I've never seen this done in practice.
@icholy are we sure this will solve the problem? Have you tested it and can this be merged to master branch? We cannot test and verify this on our prod env.
@sonic0002 if you're not going to help, please don't add noise.
hello, admin, it seems we see that the same issue occured again with latest codebase, originally you guys have fixed this, but later it seemed you added some code which reintroduced the issue again?
The code which caused this same issue now is the below code block(in client.go) per our understanding .
Based on our checking so far, when error returned from above code, the caller for loop breaks and client.shutdown is set to true and all following requests get failed.
Can you confirm this issue and if yes any plan to fix it? Thanks.
@kolo @miracle2k