NVIDIA / NVIDIA/cudf

[JNI] Cleanup MemoryBuffer/ColumnVector close methods to use common code

Open
#15,354 0 comments 0 reactions 0 assignees View on GitHub
improvement Java
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

@gerashegalov had a comment in https://github.com/rapidsai/cudf/pull/15351 that I thought would make sense as a follow on. Specifically, we'd like to make a utility available in the JNI code so that classes that need to invoke `onClosed` can do so with the same common code.

This is now inconsistent with (Host)ColumnVector. If we cannot consistently move eventHandler.onClosed into a finally please add a comment, but hopefully we can and it could be generalized via some utls withEventHandler(eventHandler) or base class implementation.

_Originally posted by @gerashegalov in https://github.com/rapidsai/cudf/pull/15351#discussion_r1532615825_

Contributor guide

Open the contributing guide

Research direction

Start by locating the JNI implementations of MemoryBuffer and ColumnVector and their close methods, then compare how each invokes eventHandler.onClosed. The work is done when both classes use a common utility or base implementation with consistent cleanup behavior, or the differing finally handling is explicitly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, java
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.