-
Notifications
You must be signed in to change notification settings - Fork 21
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
Implement client support for the XS_DIRECTORY_PART
call
#55
base: main
Are you sure you want to change the base?
Conversation
The CI will fail for OCaml <4.13 because some newer Stdlib functions are used, do we intend to support these? |
We previously discussed that the minimum OCaml version could be bumped. I'd suggest doing that in a PR of its own and checking the Ci passes there. 4.13 is probably ok mirage/ocaml-vhd#78 (comment) |
client_unix/xs_client_unix.ml
Outdated
(* Node's children changed, restart *) | ||
if data <> "" && new_generation <> generation then read_part "" "" | ||
else | ||
let data = data ^ new_data in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For efficiency it would be better to collect all strings in a list and do a String.concat
or to use a Buffer
value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to using a Buffer
in the fixup commit.
01b9eb8
to
8412de5
Compare
Signed-off-by: Frediano Ziglio <[email protected]>
Storage should not order the entries, check it adding in not alphabetical order Signed-off-by: Frediano Ziglio <[email protected]>
Since call IDs are encoded in C as enum variants, the removal of Restrict created a hole that should be treated as an error. Oxenstored treats it as an Invalid variant, so follow that practice here as well. Signed-off-by: Andrii Sultanov <[email protected]>
Also add Reset_watches call that has been added upstream - currently unimplemented. It needs to be present so as not to leave a hole in call IDs. Server implementation is a noop as well. Co-authored-by: Andrii Sultanov <[email protected]> Signed-off-by: Andrii Sultanov <[email protected]> Signed-off-by: Frediano Ziglio <[email protected]>
8412de5
to
31c85ea
Compare
Adds the partial directory call to
client_unix
. Server implementation is available in xapi-project/oxenstored#2, so wasn't attempted here.Also removes the deprecated Restrict call, and brings some minor improvements elsewhere.
Thanks to @freddy77 for working on this.
Changes were tested with the server implementation above, with the client coping well with large directories without having to utilize larger packets.