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

[ID Refactor] Shorten the length of JobID to 4 bytes #5110

Merged
merged 43 commits into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8a280dd
WIP
jovany-wang Jul 1, 2019
dff8c21
Fix
jovany-wang Jul 3, 2019
689ff32
Add jobid test
jovany-wang Jul 3, 2019
e586258
Fix
jovany-wang Jul 3, 2019
d37f3d0
Add python part
jovany-wang Jul 3, 2019
29f774d
Fix
jovany-wang Jul 3, 2019
0123990
Fix tes
jovany-wang Jul 3, 2019
7aec837
Remove TODOs
jovany-wang Jul 3, 2019
7cef169
Fix C++ tests
jovany-wang Jul 3, 2019
12e1b4c
Lint
jovany-wang Jul 3, 2019
a5598b0
Fix
jovany-wang Jul 4, 2019
aa94dfa
Fix exporting functions in multiple ray.init
jovany-wang Jul 4, 2019
e99206a
Fix java test
jovany-wang Jul 5, 2019
a04d755
Fix lint
jovany-wang Jul 5, 2019
ce63b84
Fix linting
jovany-wang Jul 5, 2019
c307934
Merge branch 'master' into short-jobid-to-4bytes
jovany-wang Jul 7, 2019
e0e34f4
Address comments.
jovany-wang Jul 7, 2019
13c4150
FIx
jovany-wang Jul 8, 2019
18bf5bf
Address and fix linting
jovany-wang Jul 8, 2019
2d047f1
Refine and fix
jovany-wang Jul 8, 2019
7656f28
Fix
jovany-wang Jul 8, 2019
f0ceceb
address
jovany-wang Jul 8, 2019
bc5de09
Address comments.
jovany-wang Jul 8, 2019
24b6a29
Fix linting
jovany-wang Jul 8, 2019
166ece8
Fix
jovany-wang Jul 8, 2019
e81714d
Address
jovany-wang Jul 8, 2019
cacd3c1
Address comments.
jovany-wang Jul 8, 2019
ea1d0eb
Address
jovany-wang Jul 8, 2019
9f89ed6
Address
jovany-wang Jul 8, 2019
68b0c26
Merge branch 'master' into short-jobid-to-4bytes
jovany-wang Jul 8, 2019
376eef0
Fix
jovany-wang Jul 8, 2019
d1e1e6b
Fix
jovany-wang Jul 8, 2019
81a7040
Fix
jovany-wang Jul 9, 2019
d2699e0
Fix lint
jovany-wang Jul 9, 2019
0892ea2
Fix
jovany-wang Jul 9, 2019
95627dc
Fix linting
jovany-wang Jul 9, 2019
bb1a0d4
Address comments.
jovany-wang Jul 10, 2019
30f4683
Fix linting
jovany-wang Jul 10, 2019
193e15e
Address comments.
jovany-wang Jul 10, 2019
01cd242
Fix linting
jovany-wang Jul 10, 2019
4889da8
Merge branch 'master' into short-jobid-to-4bytes
jovany-wang Jul 11, 2019
ebff61a
address comments.
jovany-wang Jul 11, 2019
e36061c
Fix
jovany-wang Jul 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix linting
  • Loading branch information
jovany-wang committed Jul 10, 2019
commit 30f4683cdfd53b28768dcad7a82c1129364fbac9
9 changes: 6 additions & 3 deletions python/ray/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,13 @@ def _remote(self,
*copy.deepcopy(args), **copy.deepcopy(kwargs))
else:
# Export the actor.
if self._last_export_session_and_job != worker.current_session_and_job:
if (self._last_export_session_and_job !=
worker.current_session_and_job):
# If this actor class was not exported in this session and job,
# we need to export this function again, because current GCS
# doesn't have it.
self._last_export_session_and_job = worker.current_session_and_job
self._last_export_session_and_job = (
worker.current_session_and_job)
worker.function_actor_manager.export_actor_class(
self._modified_class, self._actor_method_names)

Expand Down Expand Up @@ -612,7 +614,8 @@ def __del__(self):
# there are ANY handles in scope in the process that created the actor,
# not just the first one.
worker = ray.worker.get_global_worker()
in_correct_job = self._ray_session_and_job == worker.current_session_and_job
in_correct_job = (
self._ray_session_and_job == worker.current_session_and_job)
if worker.mode == ray.worker.SCRIPT_MODE and not in_correct_job:
# If the worker is a driver and driver id has changed because
# Ray was shut down re-initialized, the actor is already cleaned up
Expand Down
1 change: 0 additions & 1 deletion python/ray/includes/unique_ids.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ cdef class UniqueID(BaseID):
def nil(cls):
return cls(CUniqueID.Nil().Binary())


@classmethod
def from_random(cls):
return cls(os.urandom(CUniqueID.Size()))
Expand Down
1 change: 1 addition & 0 deletions python/ray/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,7 @@ def is_initialized():
"""
return ray.worker.global_worker.connected


def connect(node,
mode=WORKER_MODE,
log_to_driver=False,
Expand Down