Skip to content

Commit bb9a603

Browse files
authored
fix(analytical): Fix the garbage collection of GAE Java (#4001)
As titled.
1 parent 19d728e commit bb9a603

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

analytical_engine/java/grape-giraph/src/main/java/com/alibaba/graphscope/parallel/mm/impl/GiraphMpiMessageManager.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public void receiveMessages() {
113113
///////////////////////////////////////////
114114
bytesOfReceivedMsg += tmpVector.size();
115115
}
116+
tmpVector.delete();
116117
logger.info(
117118
"Frag [{}] totally Received [{}] bytes from others starting deserialization",
118119
fragId,
@@ -256,5 +257,9 @@ public void postSuperstep() {
256257
}
257258

258259
@Override
259-
public void postApplication() {}
260+
public void postApplication() {
261+
for (int i = 0; i < fragNum; ++i) {
262+
cacheOut[i].close();
263+
}
264+
}
260265
}

analytical_engine/java/grape-jdk/src/main/java/com/alibaba/graphscope/serialization/FFIByteVectorOutputStream.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public FFIByteVectorOutputStream(FFIByteVector vector) {
3838
offset = 0;
3939
}
4040

41+
@Override
42+
public void close() {
43+
vector.delete();
44+
}
45+
4146
public void resize(long size) {
4247
vector.resize(size);
4348
}

0 commit comments

Comments
 (0)