You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "FabioWanner (via GitHub)" <gi...@apache.org> on 2023/06/22 16:53:16 UTC

[GitHub] [flink-kubernetes-operator] FabioWanner opened a new pull request, #623: [FLINK-32412] Reduce JobID collision chance

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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-kubernetes-operator] FabioWanner commented on pull request #623: [FLINK-32412] Reduce JobID collision chance

Posted by "FabioWanner (via GitHub)" <gi...@apache.org>.
FabioWanner commented on PR #623:
URL: https://github.com/apache/flink-kubernetes-operator/pull/623#issuecomment-1606969013

   About the failing e2e test: I can not figure out the root cause for the failure... I ran the e2e tests locally and did not have any problems... I would be glad to get some pointers on what's actually going wrong. Thanks a lot!


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-kubernetes-operator] gyfora merged pull request #623: [FLINK-32412] Reduce JobID collision chance

Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora merged PR #623:
URL: https://github.com/apache/flink-kubernetes-operator/pull/623


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-kubernetes-operator] gyfora commented on pull request #623: [FLINK-32412] Reduce JobID collision chance

Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on PR #623:
URL: https://github.com/apache/flink-kubernetes-operator/pull/623#issuecomment-1607386323

   > About the failing e2e test: I can not figure out the root cause for the failure... I ran the e2e tests locally and did not have any problems... I would be glad to get some pointers on what's actually going wrong. Thanks a lot!
   
   I think that's just a flaky test unfortunately. I re-triggered it!


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org