You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "PHILO-HE (via GitHub)" <gi...@apache.org> on 2025/07/07 05:53:33 UTC
Re: [PR] [GLUTEN-10033][FLINK] Fix memory leak caused by unclosed RowVector in `GlutenSourceFunction` [incubator-gluten]
PHILO-HE commented on code in PR #10034:
URL: https://github.com/apache/incubator-gluten/pull/10034#discussion_r2189035845
##########
gluten-flink/runtime/src/main/java/org/apache/gluten/table/runtime/operators/GlutenSourceFunction.java:
##########
@@ -103,13 +103,16 @@ public void run(SourceContext<RowData> sourceContext) throws Exception {
if (state == UpIterator.State.AVAILABLE) {
final StatefulElement element = task.statefulGet();
final RowVector outRv = element.asRecord().getRowVector();
- List<RowData> rows =
- FlinkRowToVLVectorConvertor.toRowData(
- outRv, allocator, outputTypes.values().iterator().next());
- for (RowData row : rows) {
- sourceContext.collect(row);
+ try {
Review Comment:
One minor suggestion, can we just use try with resources?
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org