-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Adds timeout_ms
and a new method MultiGet
to InternalKVAccessor.
#45444
Conversation
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]>
i rebased your PR to a more recent master to have better coverage in microcheck, thankks |
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
@@ -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); |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
This is ready to merge |
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 isconst int64_t timeout_ms
.-1
means infinite timeout;> 0
means the specified timeout in milliseconds.Also adds a method MultiGet.