Skip to content

Conversation

@ldematte
Copy link
Contributor

The various Index classes in Java all have a destroyIndex method that must be called in order to free resources associated with that index, when done.
Other classes in the repository use close() instead, and extend or implement AutoCloseable; this have the advantage of support in language (try-with-resources) and tooling (e.g. IntelliJ warnings).
Additionally, having a single pattern is better for ease of use and consistency.

This PR renames all instances of destroyIndex to close and make the declaring interfaces extend AutoCloseable

@copy-pr-bot
Copy link

copy-pr-bot bot commented Aug 13, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ldematte ldematte changed the title [Java] Rename destroyIndex() to close(), extend AutoCloseable [REVIEW][Java] Rename destroyIndex() to close(), extend AutoCloseable Aug 13, 2025
@mythrocks mythrocks added improvement Improves an existing functionality non-breaking Introduces a non-breaking change breaking Introduces a breaking change and removed non-breaking Introduces a non-breaking change labels Aug 13, 2025
@mythrocks
Copy link
Contributor

mythrocks commented Aug 13, 2025

Thank you for taking this up. I've been meaning to make this change myself.

100% with you here.

@mythrocks
Copy link
Contributor

/ok to test ae78c15

Copy link
Contributor

@mythrocks mythrocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@mythrocks
Copy link
Contributor

/ok to test 9fafec7

@mythrocks
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit 279afdb into rapidsai:branch-25.10 Aug 14, 2025
53 checks passed
@mythrocks
Copy link
Contributor

Argh. I should have removed the [REVIEW] tag. I'll double check, next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Introduces a breaking change improvement Improves an existing functionality

Development

Successfully merging this pull request may close these issues.

2 participants