FabioWanner opened a new pull request, #623:
URL: https://github.com/apache/flink-kubernetes-operator/pull/623

   Instead of using Java's hashCode, which is an integer value (32bit), a long 
representation of the uid is used. This decreases the chance for an ID 
collision drastically:
   
   For a 50% collision chance with random integers, 77000 numbers need to be 
generated. For a long value (64 bit) a 50% change of a collision needs 5.1×10^9 
random longs. For details look up: "the birthday problem".
   
   A test is added to increase awareness of the problem when changing this part 
of the code.
   
   
   ## What is the purpose of the change
   
   Lower the chance of JobID collisions in session job deployments.
   
   
   ## Brief change log
   
     - *Increase the lower part of the JobID to use the 64 most significant 
bits of the ressources uid instead of the 32 bit hashCode of the uid*
   
   ## Verifying this change
   
     - *Added unit test*
     - *Adapted existing tests*
     - *Manually tested the upgrade of the operator when having a job deployed 
with the old JobID generation and then switching to a operator with the fix. 
Upgrading the job after this worked without any problems.*
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Core observer or reconciler logic that is regularly executed: yes
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to