Increase the number of unique bits for actors to avoid handle collisions (#12894)

This commit is contained in:
Eric Liang
2020-12-18 15:59:03 -08:00
committed by GitHub
parent 3521e74f3a
commit 3e492a79ec
19 changed files with 54 additions and 54 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
#include <stdint.h>
/// Length of Ray full-length IDs in bytes.
constexpr size_t kUniqueIDSize = 20;
constexpr size_t kUniqueIDSize = 28;
/// An ObjectID's bytes are split into the task ID itself and the index of the
/// object's creation. This is the maximum width of the object index in bits.
+1 -1
View File
@@ -124,7 +124,7 @@ class JobID : public BaseID<JobID> {
class ActorID : public BaseID<ActorID> {
private:
static constexpr size_t kUniqueBytesLength = 4;
static constexpr size_t kUniqueBytesLength = 12;
public:
/// Length of `ActorID` in bytes.
+2
View File
@@ -91,6 +91,8 @@ bool ActorManager::AddActorHandle(std::unique_ptr<ActorHandle> actor_handle,
std::placeholders::_1, std::placeholders::_2);
RAY_CHECK_OK(gcs_client_->Actors().AsyncSubscribe(
actor_id, actor_notification_callback, nullptr));
} else {
RAY_LOG(ERROR) << "Actor handle already exists " << actor_id.Hex();
}
return inserted;