adelapena commented on code in PR #1891:
URL: https://github.com/apache/cassandra/pull/1891#discussion_r1106970670
##########
src/java/org/apache/cassandra/db/rows/BufferCell.java:
##########
@@ -34,21 +34,34 @@ public class BufferCell extends AbstractCell<ByteBuffer>
{
private static final long EMPTY_SIZE = ObjectSizes.measure(new
BufferCell(ColumnMetadata.regularColumn("", "", "", ByteType.instance), 0L, 0,
0, ByteBufferUtil.EMPTY_BYTE_BUFFER, null));
+ // Careful: Adding vars here has an impact on memtable size
private final long timestamp;
private final int ttl;
- private final int localDeletionTime;
+ private final int localDeletionTimeGuavaUint;
private final ByteBuffer value;
private final CellPath path;
- public BufferCell(ColumnMetadata column, long timestamp, int ttl, int
localDeletionTime, ByteBuffer value, CellPath path)
+ public BufferCell(ColumnMetadata column, long timestamp, int ttl, long
localDeletionTime, ByteBuffer value, CellPath path)
Review Comment:
Instead of duplicating the contents of the constructor we can just make on
constructor call the other:
```java
public BufferCell(ColumnMetadata column, long timestamp, int ttl, long
localDeletionTime, ByteBuffer value, CellPath path)
{
this(column, timestamp, ttl,
deletionTimeLongToGuavaUint(localDeletionTime), value, path);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]