[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15105335#comment-15105335 ] Benedict commented on CASSANDRA-7925: - I'm not sure how much is occupied by Sigar if we keep it around, but I would guess it's pretty unlikely to be meaningful. Just wanted to raise it for reconsideration; +1 > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel >Assignee: Sylvain Lebresne > Fix For: 2.2.x > > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15105328#comment-15105328 ] Sylvain Lebresne commented on CASSANDRA-7925: - bq. not convinced by the extraction of SigarLibrary to an instance variable That's mostly a simple way to avoid logging {{"Initializing SIGAR library"}} (and its potential error if it can't be initialized) twice at each startup. I agree it's not really justified otherwise, but double logging would be really ugly. There is obviously other options but wonder if its worth bothering. > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel >Assignee: Sylvain Lebresne > Fix For: 2.2.x > > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15105117#comment-15105117 ] Benedict commented on CASSANDRA-7925: - Mostly +1, but not convinced by the extraction of SigarLibrary to an instance variable; it's used exactly twice, so is there any point cluttering up the place with it? > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel >Assignee: Sylvain Lebresne > Fix For: 2.2.x > > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14556230#comment-14556230 ] T Jake Luciani commented on CASSANDRA-7925: --- bq. but doing so mean that we will need to guarantee to 2 updates with the same (user provided) timestamp actually do conflict :( bq. It's not like we can't change this if we really need to later. Good point. Ok then I'll update to use the classpath and PID only. > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel >Assignee: T Jake Luciani > Fix For: 2.2.x > > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14556211#comment-14556211 ] Sylvain Lebresne commented on CASSANDRA-7925: - bq. It's currently used for paxos. Right, and that's not a problem for Paxos. bq. Also, I imagine we will still allow the clients to specify timestamps (esp for thrift) in CASSANDRA-7919 We certainly will want to preserve backward compatibility (both for thrift and CQL), but doing so mean that we will need to guarantee to 2 updates with the same (user provided) timestamp actually *do* conflict, and this no matter what node the update hits. So in fact, we'll probably have to hardcode a LSB to use for all update with user provided timestamp. In any case, I think anticipating problems for CASSANDRA-7919 is a bit premature. It's not like we can't change this if we really need to later. In general, I'd prefer keeping it to a fixed LSB for a given process if possible: it's a tad simpler, better for compression and a bit closer to the timeuuid RFC imo. And as of now, I think that's good enough. > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel >Assignee: T Jake Luciani > Fix For: 2.2.x > > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14556184#comment-14556184 ] T Jake Luciani commented on CASSANDRA-7925: --- I'm referring to the {{UUID getTimeUUID(long when)}} call. It's currently used for paxos. Also, I imagine we will still allow the clients to specify timestamps (esp for thrift) in CASSANDRA-7919 so the conversion to uuid would be on the server. > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel >Assignee: T Jake Luciani > Fix For: 2.2.x > > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14556178#comment-14556178 ] Sylvain Lebresne commented on CASSANDRA-7925: - bq. If the user specifies a time stamp though it will collide on the server What do you mean by that? That is, what method are you referring to that would allow a user to provide a timestamp that would conflict with a server side uuid? > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel >Assignee: T Jake Luciani > Fix For: 2.2.x > > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14556174#comment-14556174 ] T Jake Luciani commented on CASSANDRA-7925: --- bq. If this server generates one, the act is synchronized to ensure no duplication. There is still an open hole. If the user specifies a time stamp though it will collide on the server. I understand the downside of many lsb is compression is not as helpful. however given how we plan to use timeuuids we should ensure correctness. > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel >Assignee: T Jake Luciani > Fix For: 2.2.x > > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14555715#comment-14555715 ] Benedict commented on CASSANDRA-7925: - I'm not sure we need each thread to have its own... If a client or another server generates a UUID, they should both provide the LSB themselves. If this server generates one, the act is synchronized to ensure no duplication. I think salting clockSeqAndNode with the ClassLoader.hashCode() and PID should be sufficient? > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel >Assignee: T Jake Luciani > Fix For: 2.2.x > > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14544229#comment-14544229 ] T Jake Luciani commented on CASSANDRA-7925: --- Seems like we should have an lsb per thread. If a client or server generates a uuid at the same clocktime we want these to be unique within the process. Updated patch here. Using Sigar to get the pid. https://github.com/tjake/cassandra/tree/7925-timeuuidlsb > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14133357#comment-14133357 ] Peter Mädel commented on CASSANDRA-7925: At least for the java driver it is mandatory to add some reference to the classloader, as static variables always belong to the classloader. lsb collisions would occur e.g. when several clients are deployed within separate webapps but the same tomcat. each client would have the identical pid, but different classloaders. I dont know enough about the server runtime to decide if this is an issue for C* though. > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14132784#comment-14132784 ] Jonathan Ellis commented on CASSANDRA-7925: --- isn't pid alone sufficient? > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7925) TimeUUID LSB should be unique per process, not just per machine
[ https://issues.apache.org/jira/browse/CASSANDRA-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14132676#comment-14132676 ] Peter Mädel commented on CASSANDRA-7925: ticket for java driver: https://datastax-oss.atlassian.net/browse/JAVA-450 > TimeUUID LSB should be unique per process, not just per machine > --- > > Key: CASSANDRA-7925 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7925 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Mädel > Attachments: cassandra-uuidgen.patch > > > as pointed out in > [CASSANDRA-7919|https://issues.apache.org/jira/browse/CASSANDRA-7919?focusedCommentId=14132529&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132529] > lsb collisions are also possible serverside. > a sufficient solution would be to include references to pid and classloader > within lsb. -- This message was sent by Atlassian JIRA (v6.3.4#6332)