Initial support for ReplicateV2 - #4168
Conversation
70eadcd to
be39b31
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4168 +/- ##
==========================================
+ Coverage 31.03% 31.07% +0.03%
==========================================
Files 673 672 -1
Lines 40673 40726 +53
==========================================
+ Hits 12623 12654 +31
- Misses 28050 28072 +22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9239cb9 to
e0aa31f
Compare
| return grpcstatus.Error(grpccodes.Unimplemented, "no longer supported, use SearchV2") | ||
| } | ||
|
|
||
| func readFirstReplicateV2Request(stream protoobject.ObjectService_ReplicateV2Server) (*protoobject.ReplicateV2Request_Init, *protostatus.Status, error) { |
There was a problem hiding this comment.
Can return (*protoobject.ReplicateV2Request_Init, error) and use apistatus.Error where appropriate.
There was a problem hiding this comment.
this would lead to a "there and back" in most cases. Don't think it's worth it
| // CompareAPIVersion performs three-way comparison of API server version against | ||
| // the given one. | ||
| func CompareAPIVersion(c MultiAddressClient, major uint32, minor uint32) int { | ||
| cv := c.APIVersion() |
There was a problem hiding this comment.
Can have version.Version here as well.
|
|
||
| // CompareAPIVersion performs three-way comparison of API server version against | ||
| // the given one. | ||
| func CompareAPIVersion(c MultiAddressClient, major uint32, minor uint32) int { |
There was a problem hiding this comment.
Can accept version.Version here and have a static var somewhere.
| chunkReqNum++ | ||
| } | ||
|
|
||
| chunkReqBufItems := make([]*[]byte, chunkReqNum) |
There was a problem hiding this comment.
A lot of memory. Should use less.
Brings ReplicateV2 object API. Makes SN to serve API v2.27. Signed-off-by: Leonard Liubich <leonard@morphbits.io>
As close to `Replicate` as possible. Various optimizations will be done in the future. Refs #4157. Signed-off-by: Leonard Liubich <leonard@morphbits.io>
This will be useful to implement switch b/w Replicate and ReplicateV2 using remote conn. Signed-off-by: Leonard Liubich <leonard@morphbits.io>
These are the minimum necessary functional changes. They are not optimal due to duplicated requests when accessing multiple nodes and the request encoding of unary Replicate RPC even if it is not used. Optimizations will be made in the future. Refs #4157. Signed-off-by: Leonard Liubich <leonard@morphbits.io>
Signed-off-by: Leonard Liubich <leonard@morphbits.io>
Signed-off-by: Leonard Liubich <leonard@morphbits.io>
Signed-off-by: Leonard Liubich <leonard@morphbits.io>
e0aa31f to
da20e97
Compare
Uh oh!
There was an error while loading. Please reload this page.