Duplicated IDs are generated
See original GitHub issueWhat is the problem?
The string generated by GenerateUniqueBytes is not really unique. https://github.com/ray-project/ray/blob/0178d6318ead643fff6d9ed873c88f71fdac52e7/src/ray/common/id.cc#L40-L53
Ray version and other system information (Python version, TensorFlow version, OS): 1.0.1
Reproduction (REQUIRED)
Apply below patch and run bazel run //:id_test,
diff --git a/src/ray/common/id_test.cc b/src/ray/common/id_test.cc
index 926e6fbd11..f1274d92a5 100644
--- a/src/ray/common/id_test.cc
+++ b/src/ray/common/id_test.cc
@@ -51,6 +51,15 @@ TEST(ActorIDTest, TestActorID) {
     const ActorID actor_id = ActorID::Of(kDefaultJobId, kDefaultDriverTaskId, 1);
     ASSERT_EQ(kDefaultJobId, actor_id.JobId());
   }
+
+  {
+    // test no duplicated ID
+    std::unordered_set<ActorID> ids;
+    for (size_t i = 0; i < 1000000; i++) {
+        auto id = ActorID::Of(kDefaultJobId, kDefaultDriverTaskId, i);
+        RAY_CHECK(ids.insert(id).second) << "Duplicated ID generated: " << id;
+    }
+  }
 }
 TEST(TaskIDTest, TestTaskID) {
You will see the error:
[2020-11-20 05:37:07,442 C 104416 104416] id_test.cc:60:  Check failed: ids.insert(id).second Duplicated ID generated: 584a7e60c7000000
If we cannot run your script, we cannot fix your issue.
- I have verified my script runs in a clean environment and reproduces the issue.
 - I have verified the issue also occurs with the latest wheels.
 
Issue Analytics
- State:
 - Created 3 years ago
 - Reactions:1
 - Comments:15 (12 by maintainers)
 
Top Results From Across the Web
Enforcing unique study IDs - how to avoid duplicate IDs
In our experience, a random number of 7 digits is sufficiently random, to avoid duplicate IDs.
Read more >How to generate a unique ID based on duplicate values in ...
I am looking to generate a unique ID based on either e-mail or phonenumber. I expect the script to check through phone numbers...
Read more >Duplicate person ids when using GenerateNextPersonID
You are using GenerateNextPersonID to generate new Ids and the Ids generated are duplicates when API calls are triggered by multiple users concurrently....
Read more >PJ39570: DUPLICATE IDS BEING GENERATED FROM ... - IBM
When using the Java API to create a document or custom object, duplicate Ids would be generated occasionally. When an attempt was made...
Read more >Duplicate IDs: Student Enterprise Systems
An individual has Duplicate EMPL IDs when he/she has two or more EMPL IDs in CAESAR. EMPL IDs created in CAESAR begin with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I see.
There are 2 comments here;
We have been suffering from this issue for months. it is costly and we are working on external patch to automate restart to avoid this issue. The user experience is that Ray is unstable unfortunately.
We run evolutionary algorithm doing fitness calculations as ray actors. These actors are distributed across 100+ 2CPU EC2 isntance with 200+actors multiple times per second. We run this workload for days at a time. So for us to run 50 000 000+ actors on one cluster for one workload is very common.
Is there a known workaround to not create a new actor ID for each new actor?