jacek-lewandowski commented on code in PR #2064:
URL: https://github.com/apache/cassandra/pull/2064#discussion_r1071909821
##########
src/java/org/apache/cassandra/service/CacheService.java:
##########
@@ -439,13 +440,14 @@ public void serialize(KeyCacheKey key, DataOutputPlus
out, ColumnFamilyStore cfs
out.writeInt(Integer.MIN_VALUE); // backwards compatibility
for "int based generation only"
ByteBufferUtil.writeWithShortLength(key.desc.id.asBytes(),
out);
}
- out.writeBoolean(true);
-
- SerializationHeader header = new SerializationHeader(false,
cfs.metadata(), cfs.metadata().regularAndStaticColumns(),
EncodingStats.NO_STATS);
- new RowIndexEntry.Serializer(key.desc.version,
header).serializeForCache(entry, out);
+ // format type id is stored so that in case there is no sstable
for the key we can figure out which
+ // serializer (of which sstable format) was used and thus as can
use the right implemnentation to skip
+ // the unmatched entry
+ out.writeByte(key.desc.formatType.ordinal());
Review Comment:
I know it would be more elegant and I thought about that, but on the other
hand, we would have to have `serializedSize` at hand or buffer the whole entry.
Serialized size is not available without going through all the columns (for
indexed row entry) - I don't know if it is worth the effort. That's why I
stored format ordinal
--
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]