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

RFC: patches used by DataKit #118

Closed
wants to merge 2 commits into from
Closed

Conversation

talex5
Copy link
Contributor

@talex5 talex5 commented Apr 25, 2017

For DataKit, we apply these patches to ocaml-9p. I'm not sure we want them merged upstream in this form, but I'm making this PR to keep track of them:

  • When logging exceptions, include the 9p request that triggered it for debugging. Maybe the signature of exn_converter should be changed instead?

  • While a connection is open, send a ping message (walk to /) every 30s. This avoids problems in some networks where TCP connections may silently stop working after a while unless there is traffic to keep the connection alive. It also reports these ping times as prometheus metrics. This should probably be optional.

Thomas Leonard added 2 commits April 25, 2017 13:45
Allows logging them with their request.
This helps prevent our connection from being closed, and detects it
quickly if it does.
@talex5
Copy link
Contributor Author

talex5 commented Apr 25, 2017

Note: Travis says:

Test Successful in 0.003s. 27 tests run.
pkg.ml: [ERROR] Some tests failed.

This is because the test executable reports a failure if anything is logged at error level, and the new logging causes this to be logged from failed remove should clunk the fid in lofs_test.ml:

ERR [server] Uncaught exception handling ((tag (1))
                                          (payload (Remove ((fid 1))))): 
             Exception: Unix.Unix_error(Unix.ENOTEMPTY, "rmdir", "/Users/tal/src/ocaml-9p/tmp/foo")Fatal error: exception (Invalid_argument "index out of bounds")

Possibly this is a genuine bug and we should be catching and handling the error rather than throwing an exception.

@djs55
Copy link
Member

djs55 commented May 7, 2017

These patches have been merged as part of #122 and #123 so I'll close this one. Don't forget to use the new optional argument of connect.

@djs55 djs55 closed this May 7, 2017
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.

2 participants