[spark] Reduce driver memory usage when deserializing compact commit messages - #8897
[spark] Reduce driver memory usage when deserializing compact commit messages#8897lilei1128 wants to merge 5 commits into
Conversation
zhongyujiang
left a comment
There was a problem hiding this comment.
LGTM. We applied the same fix in our internal fork, which reduced a lot of memory consumption during commits involving large tables.
| } | ||
| } | ||
|
|
||
| private static List<CommitMessage> deserializeAndReleaseCommitMessages( |
There was a problem hiding this comment.
This is actually releasing serialized bytes, not commit messages.
There was a problem hiding this comment.
Good catch! The deserialized commit messages are retained, while only the references to the serialized byte arrays are released. I’ll rename the method to deserializeCommitMessagesAndReleaseSerializedBytes to make this explicit.
Thanks for taking a look! |
…esAndReleaseSerializedBytes
Purpose
Release serialized commit message byte arrays as they are deserialized to avoid
retaining both serialized and deserialized messages in driver memory.
Tests
No