dcapwell commented on code in PR #3954: URL: https://github.com/apache/cassandra/pull/3954#discussion_r1992436320
########## src/java/org/apache/cassandra/service/accord/journal/AccordTopologyUpdate.java: ########## @@ -55,178 +56,181 @@ static AccordTopologyUpdate newTopology(Journal.TopologyUpdate update) { return new NewTopology(update); } - class RangesForEpochSerializer implements IVersionedSerializer<CommandStores.RangesForEpoch> + class RangesForEpochSerializer implements org.apache.cassandra.io.Serializer<CommandStores.RangesForEpoch> { public static final RangesForEpochSerializer instance = new RangesForEpochSerializer(); @Override - public void serialize(CommandStores.RangesForEpoch from, DataOutputPlus out, int version) throws IOException + public void serialize(CommandStores.RangesForEpoch from, DataOutputPlus out) throws IOException { out.writeUnsignedVInt32(from.size()); - from.forEach((epoch, ranges) -> { - try - { - out.writeLong(epoch); - KeySerializers.ranges.serialize(ranges, out, version); - } - catch (Throwable t) - { - throw new IllegalStateException("Serialization error", t); - } - }); + for (int i = 0; i < from.size(); i++) Review Comment: rewrote just to avoid the catch then rethrow, and is smaller -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org