Fix resource leaks (ComplexColumn and GenericColumn)#3629
Merged
nishantmonu51 merged 5 commits intoapache:masterfrom Nov 2, 2016
Merged
Fix resource leaks (ComplexColumn and GenericColumn)#3629nishantmonu51 merged 5 commits intoapache:masterfrom
nishantmonu51 merged 5 commits intoapache:masterfrom
Conversation
…n, IndexedFloats and IndexedLongs
…er, SearchQueryRunner, QueryableIndexIndexableAdapter and QueryableIndexStorageAdapter
Contributor
|
This un-swallows a bunch of checks but that's probably a good thing |
Contributor
|
👍 |
nishantmonu51
requested changes
Nov 1, 2016
| final boolean hasNext = currRow < numRows; | ||
| if (!hasNext && !done) { | ||
| CloseQuietly.close(timestamps); | ||
| timestamps.close(); |
Member
There was a problem hiding this comment.
In case this throws exception, we will miss closing metrics and dims, probably we can use a Closer here ?
…getRows(), in order to try to close everything even if closing some parts thew exceptions
Member
Author
|
@nishantmonu51 addressed your comment. |
Member
Author
|
Related: #3637 |
nishantmonu51
approved these changes
Nov 2, 2016
Member
|
👍 |
leventov
added a commit
to metamx/druid
that referenced
this pull request
Nov 2, 2016
* Remove unused ComplexColumnImpl class * Remove throws IOException from close() in GenericColumn, ComplexColumn, IndexedFloats and IndexedLongs * Use concise try-with-resources syntax in several places * Fix resource leaks (ComplexColumn and GenericColumn) in SegmentAnalyzer, SearchQueryRunner, QueryableIndexIndexableAdapter and QueryableIndexStorageAdapter * Use Closer in Iterable, returned from QueryableIndexIndexableAdapter.getRows(), in order to try to close everything even if closing some parts thew exceptions # Conflicts: # processing/src/main/java/io/druid/segment/QueryableIndexIndexableAdapter.java # processing/src/main/java/io/druid/segment/QueryableIndexStorageAdapter.java # processing/src/main/java/io/druid/segment/column/SimpleColumn.java # processing/src/main/java/io/druid/segment/data/BlockLayoutIndexedLongSupplier.java
leventov
added a commit
to metamx/druid
that referenced
this pull request
Nov 2, 2016
* Remove unused ComplexColumnImpl class * Remove throws IOException from close() in GenericColumn, ComplexColumn, IndexedFloats and IndexedLongs * Use concise try-with-resources syntax in several places * Fix resource leaks (ComplexColumn and GenericColumn) in SegmentAnalyzer, SearchQueryRunner, QueryableIndexIndexableAdapter and QueryableIndexStorageAdapter * Use Closer in Iterable, returned from QueryableIndexIndexableAdapter.getRows(), in order to try to close everything even if closing some parts thew exceptions # Conflicts: # processing/src/main/java/io/druid/segment/QueryableIndexIndexableAdapter.java # processing/src/main/java/io/druid/segment/QueryableIndexStorageAdapter.java # processing/src/main/java/io/druid/segment/column/SimpleColumn.java # processing/src/main/java/io/druid/segment/data/BlockLayoutIndexedLongSupplier.java
fjy
pushed a commit
that referenced
this pull request
Nov 3, 2016
* Remove unused ComplexColumnImpl class * Remove throws IOException from close() in GenericColumn, ComplexColumn, IndexedFloats and IndexedLongs * Use concise try-with-resources syntax in several places * Fix resource leaks (ComplexColumn and GenericColumn) in SegmentAnalyzer, SearchQueryRunner, QueryableIndexIndexableAdapter and QueryableIndexStorageAdapter * Use Closer in Iterable, returned from QueryableIndexIndexableAdapter.getRows(), in order to try to close everything even if closing some parts thew exceptions # Conflicts: # processing/src/main/java/io/druid/segment/QueryableIndexIndexableAdapter.java # processing/src/main/java/io/druid/segment/QueryableIndexStorageAdapter.java # processing/src/main/java/io/druid/segment/column/SimpleColumn.java # processing/src/main/java/io/druid/segment/data/BlockLayoutIndexedLongSupplier.java
fundead
pushed a commit
to fundead/druid
that referenced
this pull request
Dec 7, 2016
* Remove unused ComplexColumnImpl class * Remove throws IOException from close() in GenericColumn, ComplexColumn, IndexedFloats and IndexedLongs * Use concise try-with-resources syntax in several places * Fix resource leaks (ComplexColumn and GenericColumn) in SegmentAnalyzer, SearchQueryRunner, QueryableIndexIndexableAdapter and QueryableIndexStorageAdapter * Use Closer in Iterable, returned from QueryableIndexIndexableAdapter.getRows(), in order to try to close everything even if closing some parts thew exceptions
seoeun25
pushed a commit
to seoeun25/incubator-druid
that referenced
this pull request
Feb 25, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is also
DictionaryEncodedColumn, which implementsCloseable, but closed only inQueryableIndexStorageAdapter, in other places it is consistently not closed. I'm not sureDictionaryEncodedColumn.close()is correct, and doesn't close some shared resources.