netudima commented on code in PR #4536:
URL: https://github.com/apache/cassandra/pull/4536#discussion_r2689344850
##########
src/java/org/apache/cassandra/db/memtable/Flushing.java:
##########
@@ -245,7 +245,8 @@ public static SSTableMultiWriter
createFlushWriter(ColumnFamilyStore cfs,
new SerializationHeader(true,
flushSet.metadata(),
flushSet.columns(),
-
flushSet.encodingStats()),
+
flushSet.encodingStats(),
+
flushSet.columnsChangedAfterCreation()),
Review Comment:
We may have a value column type change while a memtable is populating.
org.apache.cassandra.schema.ColumnMetadata#compareTo (used by search
iterator in
org.apache.cassandra.db.rows.UnfilteredSerializer#serializeColumnData) relies
on names, it means this logic should convert cell type to the first found in
the flushSet.columns().
Also, org.apache.cassandra.db.memtable.AbstractMemtable.ColumnsCollector#get
uses BTree, so the same compareTo named-based logic should be used there as
well.
So, if I got the logic correctly, it looks like we have have same-name cells
from different rows with a different type then we will convert it to one type
during a serialization (hm, interesting, it looks like there is no guarantee
that it will be the latest one..)
--
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]