[
https://issues.apache.org/jira/browse/PHOENIX-1422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17553766#comment-17553766
]
Kadir Ozdemir commented on PHOENIX-1422:
----------------------------------------
[~apurtell], I think supporting the SQL SEQUENCE feature without hotspot (i.e.,
a scalable and performant SEQUENCE feature) is desirable. The Jira suggests a
solution for generating unique IDs. A sequence by definition is an ordered
numeric values from a specified interval which is different than generating
unique ids without strict ordering. I suggest we open a separate Jira for such
a feature and discuss the possible solutions for that.
> Stateless Sequences
> -------------------
>
> Key: PHOENIX-1422
> URL: https://issues.apache.org/jira/browse/PHOENIX-1422
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Lars Hofhansl
> Priority: Major
>
> [~apurtell] and I were chatting yesterday.
> It would be good if Phoenix had stateless sequences, i.e. sequences that give
> out unique ids with (very) high probability.
> We can do that by starting with a timestamp, shifting it left 16 or 24 bits
> left and fill in the new bits with a random number.
> So we're guaranteed to get a new id for each millisecond and within a
> millisecond we break the tie with a random number. If we can make the
> likelihood of duplicate numbers lower than (say) a data center failure, we're
> OK. I would test this with a upsert into x ... select from x ... type query
> inserting 100's of millions of rows.
> Need to think of a syntax too.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)