[jira] [Commented] (CASSANDRA-7366) Use node's hostId instead of generating counterId-s

2014-06-11 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7366:
--

bq. How does using the hostId makes that easier?

b/c then we can safely assume that there are no local/remote shards with this 
counterId (hostId) - because we know we only started using them in 2.1, and we 
only write global shards in 2.1. So we don't need to accumulate the value over 
all the existing tables (can stop at the most recent one).

> Use node's hostId instead of generating counterId-s
> ---
>
> Key: CASSANDRA-7366
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7366
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.0
>
>
> Now that we no longer renew, or have to renew, counter ids - we can/should 
> simply reuse the node's hostId.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7366) Use node's hostId instead of generating counterId-s

2014-06-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-7366:
-

bq. Only doubling, and only the value (the context) for existing counters in 
clusters that have never renewed a counter id or made a topology change before. 

Do you mean by that that if you've already renewed counter ids then you don't 
double the size of the counter context but only add some percentage of it? If 
so, I agree, but I was just saying, if you've never renewed any counter id, 
then each counter context will double. If you have renewed, we won't double 
per-se, but we'll still grow those context the same way.

Overall, I'm not saying we shouldn't do that, I'm just listing the downside so 
we're aware of what we do. And on the plus side, while we can indeed get rid of 
the full CounterId code/concept, it's really just a UUID, so conceptually, I'm 
not sure that we'd win that much by removing it. But don't get me wrong, 
removing this would please my OCD, but since this has a small downside for 
upgrader, I'm trying to convince myself that the pros outweight the cons, and 
I'm not 100% convinced one way or another. But if you feel strongly, happy to 
go ahead.

bq. One benefit is that it would allows us to go the collectTimeOrderedData() 
path for looking up the value of the local shard

How does using the hostId makes that easier?

> Use node's hostId instead of generating counterId-s
> ---
>
> Key: CASSANDRA-7366
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7366
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.0
>
>
> Now that we no longer renew, or have to renew, counter ids - we can/should 
> simply reuse the node's hostId.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7366) Use node's hostId instead of generating counterId-s

2014-06-11 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7366:
--

Well, to me the point of the patch is not to get rid of some code, but to 
further simplify the implementation conceptually and kill one more concept 
before we hit 2.1 (counter ids in this case). (kill off remote/local shards 
before 3.0, kill off contexts, logical timestamps (in favor of micros) and 
CounterCell entirely in 3.0 - CASSANDRA-6506).

In fact, we could kill more code (CounterId the class, etc.), but I explicitly 
went with the minimal amount of change now, b/c 2.1 is so close. Just enough to 
remove the concept itself (we'll get rid of the rest in 3.0).

bq. The one downside I see might be that, unless I'm wrong, this will roughly 
double the size of the counters for all existing ones

Not really. Only doubling, and only the value (the context) for existing 
counters in clusters that have never renewed a counter id or made a topology 
change before. One benefit is that it would allows us to go the 
collectTimeOrderedData() path for looking up the value of the local shard, 
which would help us with the read-before-write path, which should be a 
reasonable win. Saving it for another ticket though.

> Use node's hostId instead of generating counterId-s
> ---
>
> Key: CASSANDRA-7366
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7366
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.0
>
>
> Now that we no longer renew, or have to renew, counter ids - we can/should 
> simply reuse the node's hostId.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7366) Use node's hostId instead of generating counterId-s

2014-06-09 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-7366:
-

The one downside I see might be that, unless I'm wrong, this will roughly 
double the size of the counters for all existing ones and I wonder if the code 
saved is worth that disagreement for our users.

I'm slightly ambivalent here on what is the best choice. On the one side if we 
ever do this, better do it sooner than later. On the other side, we've already 
made many chances to counters, so keeping a small amount of code to save some 
trouble to upgrades feels nicer.

Anyway, not feeling extremely strongly here though slightly leaning towards 
keeping things as they are to be nice to upgraders if I'd have to pick. But 
with that caveat, +1 on the patch technically speaking.

> Use node's hostId instead of generating counterId-s
> ---
>
> Key: CASSANDRA-7366
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7366
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.0
>
>
> Now that we no longer renew, or have to renew, counter ids - we can/should 
> simply reuse the node's hostId.



--
This message was sent by Atlassian JIRA
(v6.2#6252)