Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(interactive): Introduce explicit barrier for actors when switching query service to a different graph #3395

Merged
merged 4 commits into from
Dec 5, 2023

Conversation

zhanglei1949
Copy link
Collaborator

@zhanglei1949 zhanglei1949 commented Dec 4, 2023

When a StartService(graph) is received by admin service, we will

  1. The actor scope for current query actors will be cancelled.
  2. During the scope cancellation process of the query actors or after scope cancellation is completed, all requests sent to the query_service will fail and be rejected.
    The response of the http request will be like
{
  "code": 500,
  "message" : "Unable to send message, the target actor has been canceled!"
}
  1. After the previous graph is closed and new graph is opened, the new query actors will be available in a new scope.
  2. The query service is now ready to serve requests on the new graph.

Fix #3394

@zhanglei1949 zhanglei1949 changed the title feat(Interactive): Introduce explicit barrier for actors when switching query service to a different graph feat(interactive): Introduce explicit barrier for actors when switching query service to a different graph Dec 4, 2023
return true;
}

seastar::future<std::unique_ptr<seastar::httpd::reply>> hqps_ic_handler::handle(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the process of scope cancellation is ongoing, the messages encapsulating newly arrived query requests (sent to the cancelled actor) will be deleted in the current implementation, is this the expected behavior?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we will only process the requests received before the cancellation of actor scope. Requests received during the cancellation and after the cancellation is expected to return immediately.

{
  "code": 500,
  "message" : "Unable to send message, the target actor has been canceled!"
}

Copy link
Collaborator

@LiSu LiSu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhanglei1949 zhanglei1949 merged commit 3c7ace2 into alibaba:main Dec 5, 2023
29 checks passed
@zhanglei1949 zhanglei1949 deleted the restart-actor branch May 29, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(Interactive): Restart the actors when changing graph
3 participants