- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.8k
[xray] Implement actor reconstruction. #3063
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
          
     Closed
      
      
    
  
     Closed
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            61 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      7cf2a8f
              
                Add max_actor_reconstructions in task spec
              
              
                raulchen 7a1863c
              
                Add option in java annotation
              
              
                raulchen 4eb34dd
              
                add remaining_reconstructions to ActorTableData
              
              
                raulchen 2850f4d
              
                add max_reconstructions in ActorTableData
              
              
                raulchen 50ccf3f
              
                Add ActorState
              
              
                raulchen c715f6d
              
                Update actor table when actor is dead or being reconstructed
              
              
                raulchen eea9a48
              
                fix SubmitTask
              
              
                raulchen fea81b0
              
                implement ReconstructActor
              
              
                raulchen 5ad03dc
              
                fix
              
              
                raulchen a60ec79
              
                add some comments
              
              
                raulchen 9c7d2e7
              
                add a test in java
              
              
                raulchen 63cab7b
              
                trigger actor reconstruction by task
              
              
                raulchen 8f6cc0d
              
                add comments
              
              
                raulchen 1a45469
              
                format code
              
              
                raulchen b7cab0d
              
                add error_on_failure to AppendDataAt
              
              
                raulchen 50ebcc2
              
                handle node failure
              
              
                raulchen e94c0ad
              
                fix format and minor updates
              
              
                raulchen 6d9eae3
              
                minor fix
              
              
                raulchen 64139f4
              
                Implement python frontend and add a python test
              
              
                raulchen 533f782
              
                Add a test for node failure
              
              
                raulchen 69d595a
              
                fix lint & fix test
              
              
                raulchen 0f207c7
              
                address some comments
              
              
                raulchen 3be93f3
              
                change ActorTable::UpdateDataAt
              
              
                raulchen 5022c69
              
                immediately update actor state
              
              
                raulchen 99ac007
              
                add a test for intentional exit
              
              
                raulchen 2c0a2ee
              
                update comments
              
              
                raulchen 986d0f7
              
                address comments
              
              
                raulchen 178a203
              
                format
              
              
                raulchen cbfd0a3
              
                remove check and fix typos
              
              
                raulchen 0dcc401
              
                consolidate tests
              
              
                raulchen 7273ebd
              
                add actor creation dummy object id in java task
              
              
                raulchen 36fc45d
              
                unskip some tests
              
              
                raulchen 1e3ec2f
              
                fix lint
              
              
                raulchen 4a4ba7f
              
                Merge branch 'master' into reconstruct_actor
              
              
                stephanie-wang cbd6f95
              
                Fix bug where reconstruction was getting triggered for initialized ac…
              
              
                stephanie-wang 077fb49
              
                Fix actor tests and use cluster utils to test node failure
              
              
                stephanie-wang 73f4649
              
                Add test for node failure before actor is initialized
              
              
                stephanie-wang e40226d
              
                Skip reconstruction if the actor is still alive
              
              
                stephanie-wang 13e3318
              
                Test comments
              
              
                stephanie-wang 4b406ef
              
                Merge branch 'master' into reconstruct_actor
              
              
                stephanie-wang 714f810
              
                Minor changes
              
              
                robertnishihara a46a674
              
                Fix
              
              
                robertnishihara 1d7be13
              
                Minor
              
              
                robertnishihara f94d609
              
                Merge branch 'master' into reconstruct_actor
              
              
                stephanie-wang 04afbb9
              
                fixes
              
              
                stephanie-wang 0593f21
              
                Merge branch 'reconstruct_actor' of github.com:ant-tech-alliance/ray …
              
              
                stephanie-wang c523b13
              
                Refactor bookkeeping for actor dummy objects
              
              
                stephanie-wang dabc3f5
              
                small fixes
              
              
                raulchen 539a5de
              
                fix lint
              
              
                raulchen 3fc4b44
              
                fix head_node_cluster
              
              
                raulchen 7793737
              
                fix test_actor_reconstruction
              
              
                raulchen f123c25
              
                fix
              
              
                raulchen a6b35a9
              
                refine a log
              
              
                raulchen 54392fa
              
                todo
              
              
                stephanie-wang 5484e8d
              
                Put failed actor tasks back in the queue
              
              
                stephanie-wang 60cd255
              
                Update logging message
              
              
                stephanie-wang feaab8f
              
                Merge branch 'master' into reconstruct_actor
              
              
                stephanie-wang 1090e5e
              
                Merge branch 'master' into reconstruct_actor
              
              
                 6187f53
              
                Merge branch 'master' into reconstruct_actor
              
              
                stephanie-wang b7dea38
              
                Add temporary timeout for travis testing
              
              
                stephanie-wang c55e320
              
                Merge branch 'reconstruct_actor' of github.com:ant-tech-alliance/ray …
              
              
                stephanie-wang 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 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
    
  
  
    
              
        
          
  
    
      
          
            13 changes: 13 additions & 0 deletions
          
          13 
        
  java/api/src/main/java/org/ray/api/options/ActorCreationOptions.java
  
  
      
      
   
        
      
      
    
  
    
      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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,18 +1,31 @@ | ||
| package org.ray.api.options; | ||
|  | ||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
|  | ||
| /** | ||
| * The options for creating actor. | ||
| */ | ||
| public class ActorCreationOptions extends BaseTaskOptions { | ||
|  | ||
| public static final int NO_RECONSTRUCTION = 0; | ||
| public static final int INFINITE_RECONSTRUCTIONS = (int) Math.pow(2, 30); | ||
|  | ||
| public final int maxReconstructions; | ||
|  | ||
| public ActorCreationOptions() { | ||
| super(); | ||
| this.maxReconstructions = NO_RECONSTRUCTION; | ||
| } | ||
|  | ||
| public ActorCreationOptions(Map<String, Double> resources) { | ||
| super(resources); | ||
| this.maxReconstructions = NO_RECONSTRUCTION; | ||
| } | ||
|  | ||
|  | ||
| public ActorCreationOptions(Map<String, Double> resources, int maxReconstructions) { | ||
| super(resources); | ||
| this.maxReconstructions = maxReconstructions; | ||
| } | ||
| } | 
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  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.
This is confusing, but I think for actor creation tasks, the creation dummy object is actually set to nil.
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.
I think it makes more sense to use the real dummy object id here. why set to nil?
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.
It should only be set for tasks that are going to execute on an actual actor, whereas the actor creation task actually executes on a normal worker that hasn't been assigned an actor ID yet.