-
Notifications
You must be signed in to change notification settings - Fork 64
Add optional 'persist' query to PUT/PATCH array #1213
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
Conversation
5d70da0 to
a4406cd
Compare
padraic-shafer
left a comment
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.
I'm not sure how to proceed with a test for write_block. It's used sparsely at the moment.
padraic-shafer
left a comment
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.
If not too far out of scope, I also updated the websockets tests to receive all messages, with an extra read for the schema.
6db03e5 to
e387a13
Compare
|
I removed the locally edited docker-compose.yml that should not be part of this PR. |
The tiled/tiled/client/container.py Lines 912 to 915 in 9746553
|
|
My previous comment does prompt an interesting design question: what to do with x = Container.new(...) # POST
x.write(arr) # PUT
# (or x.write_block if chunked)Above I had in mind that Maybe it's better to guide users who want to use this feature to call |
|
I'm probably misunderstanding this, but what happens to the data if the user sends several patch array requests with mixed persistence (i.e. some of them persisted, then a few -- not, then persisted again...). Is there a chance to end up with inconsistent structures and data between the cache and storage? I've read this comment in the issue
but it's not clear to me how it works here. |
|
Capturing a brief discussion: The question of how to handle transient writes which change the shape of the array seems subtle and worth some care. But we can implement We can even implement We can tackle separately, later, the question of whether and how to support transient writes that alter the structure. |
|
I still plant to add:
|
|
I initially tried parameterizing I've now split |
c1a8b97 to
9523c9b
Compare
|
This PR is ready for review. |
danielballan
left a comment
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.
Seems solid! I love the docs.
Just two comments on error handing: one here in the review and another (accidentally) submitted as a standalone comment.
Resolves #1153.
Adds an optional
persistquery parameter to PUT /array/... and PATCH /array/... routes.When
True(default) the data is written as usual; otherwise the data is only streamed and not persisted.This option was also added to the write(), write_block(), and patch() methods on the DaskArrayClient.
Added new tests for PUT /array/full and PATCH /array/full.