HeartSaVioR commented on code in PR #49479: URL: https://github.com/apache/spark/pull/49479#discussion_r1917554426
########## common/kvstore/src/main/java/org/apache/spark/util/kvstore/LevelDB.java: ########## @@ -176,11 +176,13 @@ public void writeAll(List<?> values) throws Exception { final Iterator<byte[]> serializedValueIter; // Deserialize outside synchronized block - List<byte[]> list = new ArrayList<>(entry.getValue().size()); - for (Object value : values) { - list.add(serializer.serialize(value)); + { Review Comment: Ah OK, probably better to not explicitly scope as it's still clear without highlighting that code block. Btw, looks like we are performing whole write "multiple times" if there are multiple types? Wow. Nice finding! > Typical usecase is for this to be a single class. This is the thing, OK. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org