[Core] Fix session_name not reused when GCS restarts + node ip address not set for driver#39211
Closed
rkooo567 wants to merge 46 commits intoray-project:masterfrom
Closed
[Core] Fix session_name not reused when GCS restarts + node ip address not set for driver#39211rkooo567 wants to merge 46 commits intoray-project:masterfrom
rkooo567 wants to merge 46 commits intoray-project:masterfrom
Conversation
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
larrylian
reviewed
Sep 5, 2023
|
|
||
| You should also set the OS environment variable ``RAY_external_storage_namespace`` to isolate the data stored in Redis. | ||
| This makes sure that there is no data conflicts if multiple Ray clusters share the same Redis instance. | ||
| ``RAY_external_storage_namespace`` must be an unique ID, and whenever you restart a head node, |
Contributor
There was a problem hiding this comment.
Can we give users an example of unique id or generator code like uuid.uuid4() ?
| self._session_name = f"session_{date_str}_{os.getpid()}" | ||
| else: | ||
| assert not self._default_worker | ||
| session_name = ray._private.utils.internal_kv_get_with_retry( |
Contributor
There was a problem hiding this comment.
(This not a broker) . the behavior of worker node will be changed if worker node also set RAY_external_storage_namespace.
origin:
worker node's session_name always fetch from kv storage.
Now:
If worker node set RAY_external_storage_namespace. worker node's session_name will use RAY_external_storage_namespace first.
If the RAY_external_storage_namespace is set improperly by the user, it can potentially cause issues with the worker nodes.
Contributor
Author
|
Sorry @larrylian this was the emergency PR in case we cannot get #39194 in. I think #39194 will work out, so let me close the issue |
Contributor
|
ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
This is the PR that combines #37644 and also allows to reuse the session_name when GCS is restarted.
Every GCS HA users are supposed to use
RAY_external_storage_namespace, and we are using this name as a session_name. This also means all the directory will have different style naming when GCS HA is used (instead of session_, it will become session_).Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.