lgbo-ustc commented on PR #9545:
URL: 
https://github.com/apache/incubator-gluten/pull/9545#issuecomment-2864806871

   > > Should L135 be removed?
   > > ```java
   > > inRv.close();
   > > ```
   > 
   > Hi @lgbo-ustc , the close call is still needed. A Java side close call 
releases Java side reference to that row-vector only. The C++ side reference 
will still be held by the native blocking queue 
[here](https://github.com/velox4j/velox4j/blob/1e5cb702b449f7cb5b8817c87fa2487721626a3d/src/main/cpp/main/velox4j/iterator/BlockingQueue.h#L61).
 Hence, the row-vector will be completely released as soon as it's taken from 
the native blocking queue and is finished using by the Velox task.
   
   I encountered some issues when trying to release the input row vector here. 
When it reaches L135 and release the vector, the row vector is still held by 
the C++ side, causing a lookup exception.​​ But I can't reproduce the issue 
now. 
   
   ​​For safety, I believe it’s better to let the C++ side take ownership and 
handle its release.
   - After pushing into the queue, the Java side no longer seems to need the 
row vector.
   - The Java side cannot determine whether the C++ side still requires the 
object.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to