netudima commented on code in PR #4536:
URL: https://github.com/apache/cassandra/pull/4536#discussion_r2686075042
##########
src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java:
##########
@@ -245,10 +246,27 @@ public void update(LivenessInfo newInfo)
public void update(Cell<?> cell)
{
++currentPartitionCells;
- updateTimestamp(cell.timestamp());
- updateTTL(cell.ttl());
- updateLocalDeletionTime(cell.localDeletionTime());
- if (!cell.isLive(nowInSec))
+ long timestamp;
+ int ttl;
+ long localDeletionTime;
+ if (cell.getClass() == ArrayCell.class)
Review Comment:
it is a slightly different pattern of usage here and in `serialize`:
- collector is used for flush and compaction, so, we have 2 Cell types:
memtable-defined (BufferCell or NativeCell) + ArrayCell for compaction
- serialize additionally to flush and compaction is used for rows
serializing for messaging, where it have ArrayCell as well.
So, my thought was to use ArrayCell here to increase chances of monomorphic
calls (instead of bimorphic) in case of heap/offheap buffer memtables..
But, probably, it is not that important is NativeCell is ok as well here.
--
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]