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

Adds timeout_ms and a new method MultiGet to InternalKVAccessor. #45444

Merged
merged 8 commits into from
May 22, 2024

Conversation

rynewang
Copy link
Contributor

@rynewang rynewang commented May 20, 2024

This is to ensure feature parity of the accessor vs the PythonGcsClient, as a preparation step to replace the latter. Previously it sets all timeouts to a SYS_gcs_server_request_timeout_seconds but now we make it user controllable.

Semantics of the new field: for each Async methods in accessor.h, the new field is const int64_t timeout_ms. -1 means infinite timeout; > 0 means the specified timeout in milliseconds.

Also adds a method MultiGet.

rynewang added 2 commits May 16, 2024 15:26
This is to ensure feature parity of the accessor vs the PythonGcsClient, as a preparation step to replace the latter. Previously it sets all timeouts to a SYS_gcs_server_request_timeout_seconds but now we make it user controllable.

Also adds a method MultiGet.

Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
@rynewang rynewang marked this pull request as ready for review May 20, 2024 17:09
@rynewang rynewang requested a review from a team as a code owner May 20, 2024 17:09
@can-anyscale
Copy link
Collaborator

i rebased your PR to a more recent master to have better coverage in microcheck, thankks

rynewang added 2 commits May 20, 2024 11:06
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
src/ray/gcs/gcs_client/accessor.cc Show resolved Hide resolved
src/ray/gcs/gcs_client/accessor.h Outdated Show resolved Hide resolved
src/ray/gcs/gcs_client/accessor.h Outdated Show resolved Hide resolved
@@ -350,7 +350,7 @@ std::unique_ptr<std::string> GlobalStateAccessor::GetInternalKV(const std::strin
absl::ReaderMutexLock lock(&mutex_);
std::string value;

Status status = gcs_client_->InternalKV().Get(ns, key, value);
Status status = gcs_client_->InternalKV().Get(ns, key, /*timeout_ms=*/0, value);
Copy link
Collaborator

Choose a reason for hiding this comment

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

0?

@@ -88,7 +88,7 @@ TEST_F(UsageStatsClientTest, TestRecordExtraUsageTag) {
[this]() {
std::string value;
RAY_CHECK_OK(this->gcs_client_->InternalKV().Get(
"usage_stats", "extra_usage_tag__test1", value));
"usage_stats", "extra_usage_tag__test1", /*timeout_ms=*/0, value));
Copy link
Collaborator

Choose a reason for hiding this comment

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

0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

rynewang added 3 commits May 20, 2024 21:16
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
@rynewang
Copy link
Contributor Author

This is ready to merge

@jjyao jjyao enabled auto-merge (squash) May 22, 2024 04:08
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label May 22, 2024
@jjyao jjyao merged commit 6f77e74 into ray-project:master May 22, 2024
8 checks passed
@rynewang rynewang deleted the internalkv-timeout-multiget branch May 22, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants