Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-10783. Close SstFileReaderIterator in RocksDBCheckpointDiffer #6616

Merged
merged 2 commits into from
May 1, 2024

Conversation

hemantk-12
Copy link
Contributor

What changes were proposed in this pull request?

SstFileReaderIterator is not getting closed in RocksDBCheckpointDiffer that could potentially leave the file descriptor open even after RocksDB compaction deletes the file. This change is to close the SstFileReaderIterator after the use.

What is the link to the Apache JIRA

HDDS-10783

How was this patch tested?

Existing tests.

@hemantk-12 hemantk-12 added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label May 1, 2024
@hemantk-12 hemantk-12 requested a review from swamirishi May 1, 2024 18:51
Copy link
Contributor

@swamirishi swamirishi left a comment

Choose a reason for hiding this comment

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

Thanks for the patch @hemantk-12 LGTM

@hemantk-12 hemantk-12 merged commit a658802 into apache:master May 1, 2024
39 checks passed
@hemantk-12
Copy link
Contributor Author

Thanks @swamirishi for the quick review.

@errose28
Copy link
Contributor

errose28 commented May 2, 2024

Is SstFileReader and the other RocksDB classes listed in this block supposed to be allowed imports for the checkpoint differ? It looks like direct use of this class instead of the managed version is what led to this bug.

@hemantk-12
Copy link
Contributor Author

hemantk-12 commented May 2, 2024

Is SstFileReader and the other RocksDB classes listed in this block supposed to be allowed imports for the checkpoint differ? It looks like direct use of this class instead of the managed version is what led to this bug.

@errose28 you are right, direct use of the RocksDB classes led to this bug. We should be able to remove most of the RocksDB's direct usage except RocksDB objects used in here.

Created follow up task: https://issues.apache.org/jira/browse/HDDS-10787

@adoroszlai
Copy link
Contributor

supposed to be allowed imports for the checkpoint differ?

Filed HDDS-10008 some time ago to clean up the allowed imports (triggered by another leak, of Options, fixed in HDDS-10001).

jojochuang pushed a commit to jojochuang/ozone that referenced this pull request May 29, 2024
swamirishi pushed a commit to swamirishi/ozone that referenced this pull request Jun 10, 2024
…intDiffer (apache#6616)

Change-Id: I6d81cbd3a872b1598aa211949bcb42a3c91b8fdf
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 17, 2024
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 17, 2024
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 17, 2024
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 18, 2024
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snapshot https://issues.apache.org/jira/browse/HDDS-6517
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants