Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

fix: scanner.next() won't automatically recover when server side not return ERR_OK #156

Merged
merged 14 commits into from
May 8, 2021

Conversation

foreverneverer
Copy link
Contributor

@foreverneverer foreverneverer commented Apr 28, 2021

if next() rpc not response ERR_OK, it will mark _encounterError=true, and all the next() loop will directly return error. so if server side occur transient ERR_TIMEOUT,ERR_SESSION_RESET,ERR_OBJECT_NOT_FOUND,ERR_INVALID_STATE problem, it won't automatically recover after the server side recover. This pr resolve the fix when encounter the rpc failed.

Manual Test

  • start pegasus server onebox and scan task
  • stop one replica instance, and then client report ERR_SESSION_RESET and update config automatically
  • client send next rpc and receive CONTEXT_ID_NOT_EXIST for using new config, which will triger asyncStartScan with current hashKey and sortKey as start index
  • client recover and receive right value
  • re-start instance that has been stopped and set_meta_level=true to rebalance the onebox cluster
  • client receive ERR_INVALID_STATE and update config automatically again
  • client send next rpc and receive CONTEXT_ID_NOT_EXIST for using new config, which will triger asyncStartScan with current hashKey and sortKey as start index
  • client recover and receive right value

@foreverneverer foreverneverer marked this pull request as ready for review April 28, 2021 10:59
levy5307
levy5307 previously approved these changes Apr 29, 2021
@foreverneverer foreverneverer marked this pull request as ready for review April 29, 2021 13:13
@foreverneverer foreverneverer requested a review from levy5307 April 29, 2021 13:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants