appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
32.48k stars 3.52k forks source link

[Task] Update no. of characters in run Id to increase the probability of uniqueness #34113

Open infinitetrooper opened 1 month ago

infinitetrooper commented 1 month ago

For 8 character alpha-numeric, The probability of finding at least one non-unique sample among 1000000 (=10^6) samples, sampled uniformly at random from a set of 2821109907456 (≈3*10^12) items, is: ≈16.2417113536%

If we move it to 10 character alpha-numeric, The probability of finding at least one non-unique sample among 1000000 (=10^6) samples, sampled uniformly at random from a set of 3656158440062976 (≈4*10^15) items, is: ≈0.0136746074% (≈10^-4)

If we move it to 12 character alpha-numeric, The probability of finding at least one non-unique sample among 1000000 (=10^6) samples, sampled uniformly at random from a set of 4738381338321616896 (≈5*10^18) items, is: ≈0.0000105521% (≈10^-7) (Stirling's approximation used in factorial calculation)

Or using Milliseconds since EPOC can give us that uniqueness as well probably.

razelos commented 1 month ago

Hey, could you provide more info on where I could find where this number is generated so I can change it? Thanks!

infinitetrooper commented 1 month ago

@razelos - Thanks for your interest but, this is part of our paid edition so it cannot be picked up by external contributions. Please check for Good First Issues to find a ticket you can contribute to.

infinitetrooper commented 2 weeks ago

Nano Id, Collison Calculator.