vesoft-inc / nebula-python

Client API of Nebula Graph in Python
191 stars 75 forks source link

renew Session for session expired & reconnect connection of session for IOError #276

Closed Nicole00 closed 6 months ago

Nicole00 commented 1 year ago

add re-execute operation, before re-execute, we should renew the session if the failure is E_SESSION_INVALID or E_SESSION_TIMEOUT, and we should reconnect the session's connection for IO Error, and just re-execute for E_EXECUTION_ERROR.

Don't retry for E_STATEMENT_EMPTY and E_SYNTAX_ERROR.

wey-gu commented 1 year ago

Sure, I can do this :) @Nicole00

wey-gu commented 1 year ago

https://github.com/vesoft-inc/nebula-python/issues/275

wey-gu commented 1 year ago

like implementations from, with (exponential)backoff-wise retry based on different exceptions.

https://github.com/jerryjliu/llama_index/blob/c528cf6857193a6056cfb2d77666ba3c5659750b/llama_index/graph_stores/nebulagraph.py#L170