[ https://issues.apache.org/jira/browse/CASSANDRA-1936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-1936: ---------------------------------------- Attachment: 0001-Put-partitioned-counter-directly-in-column-value.patch Attaching new patch rebased after #1944 (I've replaced my old patch). It took a slightly different approach to the 'lazy materialization of value' in that it introduces a new type of (temporary) column (called CounterUpdateColumn - since it's a column holding a counter update - but if someone has a better idea for a name...) that holds the delta until it reaches a replica, at which time the CounterUpdateColumn is transformed to the equivalent CounterColumn. I'm keen on this solution for two reasons: # We don't have to keep a long delta in the CounterColumn that is useless as soon as the column as been properly initialized. # I have a patch for #1938 that is taking shape and I do have a use for this CounterUpdateColumn. I'm also pretty sure it will be necessary when/if we add the replay markers. This is a reasonably big patch but this is in good part because of the move in CounterContext from byte[] to ByteBuffer. > Fit partitioned counter directly into CounterColumn.value > ---------------------------------------------------------- > > Key: CASSANDRA-1936 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1936 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Sylvain Lebresne > Assignee: Sylvain Lebresne > Fix For: 0.8 > > Attachments: > 0001-Put-partitioned-counter-directly-in-column-value.patch, > 1936-ALT-0001-lazily-materialize-value.patch > > Original Estimate: 8h > Remaining Estimate: 8h > > The current implementation of CounterColumn keeps both the partitioned > counter and the total value of the counter (that is, the sum of the parts of > the partitioned counter). > This waste space and this requires the code to keep both representation in > sync. This ticket propose to remove the total value from the representation > and to only calculate it when returning the value to the client. > NOTE: this breaks the on-disk file format (for counters) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.