[ 
https://issues.apache.org/jira/browse/CASSANDRA-17048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17431081#comment-17431081
 ] 

Jacek Lewandowski commented on CASSANDRA-17048:
-----------------------------------------------

This patch is pretty flexible, it allows you to provide any generation ID 
factory, the changes make the usages agnostic to the format of the generation 
ID. Thus the only requirement is that it is sortable, generated in monotonic, 
growing order, and convertible to/from string and bytes. As such, switching to 
UUID v1 or v7 or whatever else is just a matter of providing another 
implementation. 

However:
- ULID has shorter default string representation (26 vs 36 characters) - 
obviously it is just the default representation and we can use represent UUID 
in the same form as both ids have 128 bits
- UUID v1 is not lexicographically sortable by default as you mentioned, so we 
would have to be forced to use a custom representation anyway
- AFAIK no UUID is guaranteed to generate monotonically growing identifiers 
when two are generated almost at the same time - this would probably never a 
problem in this context though

All in all, if we are forced wrap any UUID representation with some utilities 
to make its representation satisfy our needs, then I don't really know why not 
to use ULID as its implementation provides us everything we need



> Replace sequential sstable generation identifier with ULID
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-17048
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17048
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local/SSTable
>            Reporter: Jacek Lewandowski
>            Assignee: Jacek Lewandowski
>            Priority: Normal
>             Fix For: 4.1
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Replace the current sequential sstable generation identifier with ULID based.
> ULID is better because we do not need to scan the existing files to pick the 
> starting number as well as we can generate globally unique identifiers. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to