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

Go-datakit handle large values when reading / writing in 9db #292

Merged
merged 8 commits into from
Jun 16, 2017

Conversation

simonferquel
Copy link
Contributor

Requires docker-archive/go-p9p#27 and docker-archive/go-p9p#28

When dealing with messages larger than the negociated MSize value, go-p9p truncates writes and makes partial reads (without the 2 prs, it just fails). Clients must be aware of that and use the returned n value to handle that gracefully.

This PR introduces an io.Reader / io.Writer compliant wrapper that handles that correctly (and use it for Snapshot.Read and Transaction.Write operations)

@samoht
Copy link
Member

samoht commented Oct 27, 2016

@simonferquel Can I merge this PR now that the 2 other ones have been merged?

@samoht
Copy link
Member

samoht commented Nov 9, 2016

@simonferquel ping?

@simonferquel
Copy link
Contributor Author

The most important pr was closed without being merged. We have yet to find a solution both fixing the problem and satisfying Stephen.

@talex5
Copy link
Contributor

talex5 commented Nov 11, 2016

This seems to be blocked on docker-archive/go-p9p#29 (or possibly docker-archive/go-p9p#30).

@stevvooe
Copy link

We have yet to find a solution both fixing the problem and satisfying Stephen.

You have yet to propose a solution that leverages Go's IO model. It also lacks a proper bug report and reproduction of the issue. So far, I've taken time out of my regular tasks to characterize and propose a solution for the write side. I have characterized the problem for the read side but have not had time to create a minimally invasive solution.

I'm still waiting on confirmation from @simonferquel that docker-archive/go-p9p#30 addresses the write side of the issue.

If the issues with the existing proposal (docker-archive/go-p9p#29) are not yet understood, please reach out so we can resolve this.

@stevvooe
Copy link

docker-archive/go-p9p#30 should now address the described issues.

@simonferquel
Copy link
Contributor Author

We are almost there : current package runs alongside docker-archive/go-p9p#30. This PR is almost ready to merge.

@talex5
Copy link
Contributor

talex5 commented Nov 25, 2016

Is this ready for merging now or are we still waiting for something?

@simonferquel simonferquel changed the title [Do Not Merge] Go-datakit handle large values when reading / writing in 9db Go-datakit handle large values when reading / writing in 9db Nov 25, 2016
@simonferquel
Copy link
Contributor Author

Good to merge (just need to update go-p9p to the latest master version to build and run correctly). Be careful when vendoring into piñata.

@talex5
Copy link
Contributor

talex5 commented Dec 6, 2016

Good to merge (just need to update go-p9p to the latest master version to build and run correctly).

@simonferquel : Could you clarify: is this good to merge, or are we waiting to update go-p9p?

@samoht
Copy link
Member

samoht commented Apr 26, 2017

@djs55 @simonferquel could we close and/or merge this PR? I am not sure anymore which fork is used in Docker for Mac today ...

@samoht
Copy link
Member

samoht commented Jun 16, 2017

Thanks for the rebase! As discussed with @simonferquel and @ebriney I am merging this.

@djs55 do you know why cb0fe49 is needed? I guess this is related to the changes that you made recently in the config code. Can you check what is going on?

@samoht samoht merged commit edb777d into moby:master Jun 16, 2017
@djs55
Copy link
Collaborator

djs55 commented Jun 16, 2017

@samoht I didn't spot an obvious problem with cb0fe49 but perhaps there was an API change which broke the tests. I'll take a look when I've got a moment (probably not today unfortunately)

samoht added a commit to samoht/opam-repository that referenced this pull request Nov 21, 2017
CHANGES:

- all: update to latest version of alcotest, conduit, session, ocaml-github,
  ocaml-github-hooks and cohttp (moby/datakit#612, @samoht and @djs55)

- github: make `User.t` abstract (moby/datakit#594, @samoht)
- github: turn `Webhook.events` into a promise (moby/datakit#598, @samoht)
- github: add a `Comment` module to model PR and issue comments (moby/datakit#595, @samoht)
- github: change `PR.owner` to be of type `User.t` (moby/datakit#599, @samoht)

- github-bridge: add the ability to sync PR's coments (moby/datakit#595, @samoht)

- go-client: handle large values when reading / writing in 9db (moby/datakit#292, @simonferquel)
- go-client: fix the handling of defaults over upgrade (moby/datakit#605, @djs55)
- go-client: improve transaction API (moby/datakit#606, @djs55)
samoht added a commit to samoht/opam-repository that referenced this pull request Nov 23, 2017
CHANGES:

- all: update to latest version of alcotest, conduit, session, ocaml-github,
  ocaml-github-hooks and cohttp (moby/datakit#612, @samoht and @djs55)

- github: make `User.t` abstract (moby/datakit#594, @samoht)
- github: turn `Webhook.events` into a promise (moby/datakit#598, @samoht)
- github: add a `Comment` module to model PR and issue comments (moby/datakit#595, @samoht)
- github: change `PR.owner` to be of type `User.t` (moby/datakit#599, @samoht)

- github-bridge: add the ability to sync PR's coments (moby/datakit#595, @samoht)

- go-client: handle large values when reading / writing in 9db (moby/datakit#292, @simonferquel)
- go-client: fix the handling of defaults over upgrade (moby/datakit#605, @djs55)
- go-client: improve transaction API (moby/datakit#606, @djs55)
samoht added a commit to samoht/opam-repository that referenced this pull request Nov 23, 2017
CHANGES:

- all: update to latest version of alcotest, conduit, session, ocaml-github,
  ocaml-github-hooks and cohttp (moby/datakit#612, @samoht and @djs55)

- github: make `User.t` abstract (moby/datakit#594, @samoht)
- github: turn `Webhook.events` into a promise (moby/datakit#598, @samoht)
- github: add a `Comment` module to model PR and issue comments (moby/datakit#595, @samoht)
- github: change `PR.owner` to be of type `User.t` (moby/datakit#599, @samoht)

- github-bridge: add the ability to sync PR's coments (moby/datakit#595, @samoht)

- go-client: handle large values when reading / writing in 9db (moby/datakit#292, @simonferquel)
- go-client: fix the handling of defaults over upgrade (moby/datakit#605, @djs55)
- go-client: improve transaction API (moby/datakit#606, @djs55)
samoht added a commit to samoht/opam-repository that referenced this pull request Nov 23, 2017
CHANGES:

- all: update to latest version of alcotest, conduit, session, ocaml-github,
  ocaml-github-hooks and cohttp (moby/datakit#612, @samoht and @djs55)

- github: make `User.t` abstract (moby/datakit#594, @samoht)
- github: turn `Webhook.events` into a promise (moby/datakit#598, @samoht)
- github: add a `Comment` module to model PR and issue comments (moby/datakit#595, @samoht)
- github: change `PR.owner` to be of type `User.t` (moby/datakit#599, @samoht)

- github-bridge: add the ability to sync PR's coments (moby/datakit#595, @samoht)

- go-client: handle large values when reading / writing in 9db (moby/datakit#292, @simonferquel)
- go-client: fix the handling of defaults over upgrade (moby/datakit#605, @djs55)
- go-client: improve transaction API (moby/datakit#606, @djs55)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants