-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Integrate credis with Ray & route task table entries into credis. #1841
Merged
robertnishihara
merged 18 commits into
ray-project:master
from
concretevitamin:integrate-credis
May 25, 2018
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6e2c2e8
Integrate credis with Ray: route task table entries into credis.
concretevitamin aadee29
Fix client_test: qualify chain tests under flag; start correct server
concretevitamin cd1d28a
Refactor so that gcs::CommandType is propagated per Client -> Table
concretevitamin 0380191
Address all other comments
concretevitamin f951b6e
Address comments, fix tests
concretevitamin 0ebe563
Fix credis_test.py
concretevitamin bc5df2c
A bunch of script changes, load credis when on
concretevitamin f73cc73
Fix tests
concretevitamin b308290
Skip sharded test
concretevitamin 12f8b34
Fix stuff that went bad during rebase
concretevitamin 88714c1
Address comments
concretevitamin 6460024
Cleanups to address comments
concretevitamin 13f0d3a
Fix test
concretevitamin 0a79cca
Address comments
concretevitamin 0ce22b5
Fixes
concretevitamin a27e235
Fix retried port not being actually used
concretevitamin 321c9f5
Seems passing now.
concretevitamin c5e69f6
Use clang-format-3.8
concretevitamin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -580,21 +580,23 @@ def _start_redis_instance(node_ip_address="127.0.0.1", | |
for module in modules: | ||
assert os.path.isfile(module) | ||
counter = 0 | ||
print('_start_redis_instance; modules:', modules, '; port', port) | ||
if port is not None: | ||
# If a port is specified, then try only once to connect. | ||
num_retries = 1 | ||
else: | ||
port = new_port() | ||
print(' port', port) | ||
|
||
load_module_args = [] | ||
for module in modules: | ||
load_module_args += ["--loadmodule", module] | ||
command = [executable, "--port", | ||
str(port), "--loglevel", "warning"] + load_module_args | ||
|
||
while counter < num_retries: | ||
if counter > 0: | ||
print("Redis failed to start, retrying now.") | ||
command = [executable, "--port", | ||
str(port), "--loglevel", "warning"] + load_module_args | ||
p = subprocess.Popen(command, stdout=stdout_file, stderr=stderr_file) | ||
time.sleep(0.1) | ||
# Check if Redis successfully started (or at least if it the executable | ||
|
@@ -604,10 +606,11 @@ def _start_redis_instance(node_ip_address="127.0.0.1", | |
all_processes[PROCESS_TYPE_REDIS_SERVER].append(p) | ||
break | ||
port = new_port() | ||
print(' port', port) | ||
counter += 1 | ||
if counter == num_retries: | ||
raise Exception("Couldn't start Redis. Check stderr file " + | ||
stderr_file.name) | ||
raise Exception("Couldn't start Redis. Check stdout file " + | ||
stdout_file.name) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is still incorrect because |
||
|
||
# Create a Redis client just for configuring Redis. | ||
redis_client = redis.StrictRedis(host="127.0.0.1", port=port) | ||
|
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.
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.
If you look at the above code block, retries should be happening only when the port is not specified, and if the port is specified, then a different random port should be tried each time. This is inconsistent with the error message I'm seeing
Any idea about this?