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

Don't restrict users to small puts #4

Open
stuarteberg opened this issue Jun 24, 2015 · 3 comments
Open

Don't restrict users to small puts #4

stuarteberg opened this issue Jun 24, 2015 · 3 comments

Comments

@stuarteberg
Copy link
Member

Attempting to push moderately large label volumes results in an error:

Cannot allocate larger than INT_MAX

Where INT_MAX is 2^31. It isn't clear to me exactly why this restriction is necessary. Even if it is necessary, it would be nice to handle the necessary splitting/looping internally, so the client doesn't have to worry about it.

@stephenplaza
Copy link
Contributor

I agree that we could technically handle the splitting and looping, but this interface (for the most part) tries to mirror DVID's interface. DVID has a restriction on how much you can POST at once. I think the restriction makes it very clear to users that they should reconsider their workflow if they need to do such a large monolithic POST.

That being said, perhaps an idiomatic thing would be to extend some of the 'algorithms' that libdvid provides. I added code a few weeks ago that handles gets and posts of arbitrarily large bodies (see DVIDThreadedFetch). In theory, this functionality could be inlined with the rest of the API but their complexity and time guarantees are much different than the rest of the API.

@stuarteberg
Copy link
Member Author

DVID has a restriction on how much you can POST at once.

Thanks for the info -- I didn't know that. What is the limit?

@stephenplaza
Copy link
Contributor

Not sure. I think it is around 1-2 GB. I should probably match that exactly in libdvid but I got lazy and just chose INT_MAX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants