0

It's a bit stupid question, but I don't have enough relevant expirience to answer it myself.

Can a snowflake generated ID (274950720577339394), be bigger then unsigned_long type of integer? (2^64-1)

Just a bit more info. I'd like to store snowflake IDs inside the elasticsearch index, and according to it's integer types there is a unsigned_long which I guess should perfectly fit, and store snowflake as a number. So doesn't it a good idea? Or it's safe to use keyword instead of int types?

AlexZeDim
  • 3,520
  • 2
  • 28
  • 64

1 Answers1

1

No, they can't.

According to this post on Google Groups,

IDs will still be 64-bit unsigned integers

Note that this post was posted in 2010, which is a while ago, but it doesn't seem it was changed.

MC Emperor
  • 22,334
  • 15
  • 80
  • 130
  • Yes, I have also checked Wiki article about it, seems snowflakes are strict >=64bits, unless you are not dealing with customize version of it, like Instagramm UUID. – AlexZeDim May 01 '22 at 09:34