Commit Graph

70 Commits

Author SHA1 Message Date
wei liu
147a3b8bdc
fix: Grpcclient return unrecoverable error (#31256)
issue: #31222

grpcclient's `call` func return a unrecoverable error, then the caller's
retry policy also breaks due to this unrecoverable error.

This PR introduce `retry.Handle`, the new func use `func() (bool,
error)` as input parameters, which return `shouldRetry` directly, to
avoid grpcclient return a unrecoverable error

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-03-15 10:03:05 +08:00
aoiasd
d19a82e3f6
enhance: support stream call for grpc client (#30013)
relate: https://github.com/milvus-io/milvus/issues/29719

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2024-03-07 17:45:01 +08:00
wei liu
fa73520b57
fix: Make datacoord client retry on index api (#30654)
issue: #20553

This PR add retry on all interface which belong to indexcoord in milvus
2.2 and. move to data coord in milvus 2.3, to prevent meet
`unimplemented` error during rolling upgrade from milvus 2.2 to 2.3.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-03-04 15:32:59 +08:00
chyezh
77477d6340
fix: wrong context passing into NewClient, error handling lost in session_util (#30817)
issue: #30799

Signed-off-by: chyezh <chyezh@outlook.com>
2024-02-28 10:40:09 +08:00
congqixia
f699be79f7
fix: grpc client check session skipped due to role not match (#29356)
Related to #28815

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-12-21 10:12:51 +08:00
congqixia
1fe5f12bd5
enhance: Add client connect wrapper to keep connection alive (#29058)
See also #29057
Add wrapper to maintain client&connection
When reset operation is needed, `Close` method shall wait until all
on-going request return

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-12-11 17:20:38 +08:00
MrPresent-Han
fc30d291be
fix createCollection failed occasionally (#28592) (#28712)
fix: create collection seldom failure #28592

Signed-off-by: MrPresent-Han <chun.han@zilliz.com>
2023-11-27 11:10:25 +08:00
wei liu
bce1054f92
Fix retry when proxy stopped (#28264)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2023-11-09 18:58:21 +08:00
wei liu
da41a5b51e
fix check grpc error logic (#28182)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2023-11-07 11:54:18 +08:00
wei liu
68a86471ba
fix grpc client retry on node server not match error (#28169)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2023-11-03 23:42:16 +08:00
wei liu
ecec5dfcfd
fix retry on offline node (#28079)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2023-11-03 10:14:16 +08:00
yihao.dai
49b3a12804
Return newly defined merr instead of grpc unimplemented err (#27751)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2023-10-18 15:32:11 +08:00
wei liu
7aa862c0ea
fix retry on unimplemented rpc error (#27639)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2023-10-16 10:50:09 +08:00
yah01
be980fbc38
Refine state check (#27541)
Signed-off-by: yah01 <yah2er0ne@outlook.com>
2023-10-11 21:01:35 +08:00
SimFG
26f06dd732
Format the code (#27275)
Signed-off-by: SimFG <bang.fu@zilliz.com>
2023-09-21 09:45:27 +08:00
yah01
9baff1b81c
Rename error to match the nameing rules (#27214)
Signed-off-by: yah01 <yah2er0ne@outlook.com>
2023-09-20 10:59:24 +08:00
yah01
7bb20fa394
Fix the double nil return values from RPC call (#27101)
Signed-off-by: yah01 <yah2er0ne@outlook.com>
2023-09-14 19:01:19 +08:00
congqixia
c32a9a1d4a
Fix grpcclient use needReset as needRetry for cancel&timeout code (#27091)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-09-14 17:47:26 +08:00
congqixia
f0d0651989
Do not reset connection immediately if grpc code is Canceled or DeadlineExceeded (#27014)
We found lots of connection reset & canceled due to recent retry change
Current implementation resets connection no matter what the error code is
To sync behavior to previous retry, skip reset connection only if cancel error happens too much.

Also adds a config item for minResetInterval for grpc reset connection

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-09-13 15:01:18 +08:00
SimFG
0901b76732
Avoid the panic when the status of rpc response is nil (#26910)
Signed-off-by: SimFG <bang.fu@zilliz.com>
2023-09-07 19:23:15 +08:00
SimFG
28681276e2
Improve the retry of the rpc client (#26795)
Signed-off-by: SimFG <bang.fu@zilliz.com>
2023-09-06 17:43:14 +08:00
yah01
3349db4aa7
Refine errors to remove changes breaking design (#26521)
Signed-off-by: yah01 <yah2er0ne@outlook.com>
2023-09-04 09:57:09 +08:00
yah01
dd4bc5b6a0
Fix data race in gRPC client (#26574)
Signed-off-by: yah01 <yah2er0ne@outlook.com>
2023-08-28 18:26:28 +08:00
jaime
b82fc8d6e7
[skip e2e] Add connection log for etcd and grpc (#26536)
Signed-off-by: jaime <yun.zhang@zilliz.com>
2023-08-22 21:20:24 +08:00
wayblink
71133e5eaa
Check and reset if grpc client serverID mismatch with session (#26448)
Signed-off-by: wayblink <anyang.wang@zilliz.com>
2023-08-18 22:50:20 +08:00
yihao.dai
63b86b32a6
Add server id validation interceptor (#26395)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2023-08-17 20:20:20 +08:00
wei liu
74133a3996
refine retry on grpc (#26360)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2023-08-16 19:36:18 +08:00
congqixia
e13b6b88eb
Replace deprecated grpc WithInsecure option (#26226)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-08-09 13:37:16 +08:00
wei liu
0e103efc5d
disable retry in grpc connect and grpc sendMsg (#26095)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2023-08-03 15:23:07 +08:00
SimFG
69d274d233
Improve the operation log (#25589)
Signed-off-by: SimFG <bang.fu@zilliz.com>
2023-07-14 16:08:31 +08:00
yihao.dai
9f5756f16e
Add cluster validation interceptor to resolve the ip-reuse issue (#25001)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2023-06-21 11:36:46 +08:00
congqixia
41af0a98fa
Use go-api/v2 for milvus-proto (#24770)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-06-09 01:28:37 +08:00
yah01
ebd0279d3f
Check error by Error() and NoError() for better report message (#24736)
Signed-off-by: yah01 <yang.cen@zilliz.com>
2023-06-08 15:36:36 +08:00
Enwei Jiao
a933b595c4
Add trace log for grpc client (#23951)
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
2023-05-09 10:10:41 +08:00
jaime
c9d0c157ec
Move some modules from internal to public package (#22572)
Signed-off-by: jaime <yun.zhang@zilliz.com>
2023-04-06 19:14:32 +08:00
congqixia
31c22e5d24
Fix NodeID rw race (#22945)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-03-23 11:45:57 +08:00
congqixia
732986aa04
Remove fmt.Print from internal package (#22722)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-03-14 17:36:05 +08:00
congqixia
fa5c33975e
Fix reset connection data race (#22483)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-03-01 11:21:47 +08:00
congqixia
608615e5bd
Add background health check if ctx err returned (#22439)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-02-28 14:11:47 +08:00
Enwei Jiao
697dedac7e
Use cockroachdb/errors to replace other error pkg (#22390)
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
2023-02-26 11:31:49 +08:00
Xiaofan
f8e1566b24
Support zstd compression in grpc (#21689)
Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
2023-01-13 10:55:41 +08:00
Enwei Jiao
fb42466c65
Use opentelemetry (#21509)
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
2023-01-12 16:09:39 +08:00
Enwei Jiao
166e9f0da5
Refactor GrpcConfig (#21142)
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>

Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
2022-12-16 15:59:23 +08:00
zhenshan.cao
9724ae5e27
Refine log level (#20904)
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
2022-12-01 20:07:15 +08:00
smellthemoon
108e51b2f0
[test]Create index before load and fix error message (#19874) (#19857)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
Co-authored-by: zhuwenxing <wenxing.zhu@zilliz.com>
2022-10-19 10:01:26 +08:00
Enwei Jiao
0a83cdfe1b
Refactor grpclient, make it generic (#19791)
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>

Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
2022-10-17 20:05:26 +08:00
cai.zhang
c58a8d8fd6
Support bind IndexNode mode (#19247)
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
2022-09-27 22:38:55 +08:00
SimFG
f4c6a6734e
Fix rpc retry policy not taking effect (#17673)
Signed-off-by: SimFG <bang.fu@zilliz.com>
2022-06-22 22:22:13 +08:00
congqixia
d1de8cabdd
Fix %w verb for error wrapping in grpcclient (#17484)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2022-06-13 12:48:08 +08:00
congqixia
de8f2f76c5
Fix shardLeader cache with ErrConnect check (#17402)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2022-06-07 12:20:06 +08:00