Details
-
Improvement
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
WorkerConnectionInfo::id is a integer value. It is generated in Worker by a hashCode as follows:
public WorkerConnectionInfo(String host, int peerRpcPort, int pullServerPort, int clientPort, int queryMasterPort, int httpInfoPort) { ... this.queryMasterPort = queryMasterPort; this.httpInfoPort = httpInfoPort; this.id = hashCode();
Fundamentally, it uses hashCode method, so there are possibility to cause duplicate integer value. But, all codes assume its uniqueness. It is a potential problem.