Add uploading snapshot to the client#27
Conversation
8720096 to
fefaae0
Compare
|
You could test the feature manually by spinning a cluster using your knowledge of our test Python infrastructure. Either create a new test that only creates a cluster or take an existing one and add a thread sleep to keep it up :) |
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
|
Good idea. Although the testing was so convoluted but it works. |
agourlay
left a comment
There was a problem hiding this comment.
LGTM 👍
Thanks for going it the extra mile by testing it manually.
I believe we will merge this PR when releasing the qdrant version containing the new API.
|
The approach of mixing gRPC functionality with rest endpoints is not the best looking api, in order to access snapshot API we need to establish a completely unrelated gRPC connection. I think we should reconsider our approach to this before we proceed with merging those changes |
This PR adds the implementation of snapshot uploading using
reqwest'smultipartfeature.Once again, I couldn't test this on an actual cluster since the integration-tests.sh file only spins up a single node.
I didn't know whether you'd want the upload functionality should be behind a feature flag like the
download_snapshotor not.Another implementation detail, the part name:
"snapshot"inrust-client/src/client.rs
Line 1195 in fefaae0
is coupled to the struct field name in
https://github.com/qdrant/qdrant/blob/d632cfbf274410ea52bb46dfb35ab21c64d89e94/src/actix/api/snapshot_api.rs#L41
so, if it for some reason changes in the future, the client will have to adapt too. Which is definitely not ideal but I can't think of a better way to solve the issue without some kind of relationship between the two crates.