Skip to content

Remove obsolete comments and add minor improvements to OfflineIterator#2421

Merged
DomGarguilo merged 2 commits intoapache:mainfrom
DomGarguilo:offlineIteratorFix
Jan 20, 2022
Merged

Remove obsolete comments and add minor improvements to OfflineIterator#2421
DomGarguilo merged 2 commits intoapache:mainfrom
DomGarguilo:offlineIteratorFix

Conversation

@DomGarguilo
Copy link
Copy Markdown
Member

Closes #2413

#2413 was created to address the possibility of two things:

  • Reusing common code within ScanDataSource
  • Closing resources that were left open (readers, files)

It seems that neither of these should be done.

The original Jira ticket referenced shared code between OfflineIterator and Tablet, but since then, the code has moved to ScanDataSource and changed significantly meaning extracting commonalities between the two may not be worth it/feasible.

The second point about closing the resources proves to cause error. If the readers or files are closed, the iterator fails to read the intended data therefore I think its best if they are not closed.

The changes made in this PR:

  • Remove the comments that refer to these issues
  • Make some variables final
  • Simplify some logic

@DomGarguilo DomGarguilo merged commit 1f80b74 into apache:main Jan 20, 2022
@DomGarguilo DomGarguilo deleted the offlineIteratorFix branch January 20, 2022 14:30
@ctubbsii ctubbsii added this to the 2.1.0 milestone Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OfflineIterator forks ScanDataSource code and doesn't close readers

2 participants