Skip to content

SOLR-17456: TransactionLog ctor integrity#2762

Merged
dsmiley merged 1 commit intoapache:mainfrom
dsmiley:solr17456
Nov 4, 2024
Merged

SOLR-17456: TransactionLog ctor integrity#2762
dsmiley merged 1 commit intoapache:mainfrom
dsmiley:solr17456

Conversation

@dsmiley
Copy link
Contributor

@dsmiley dsmiley commented Oct 14, 2024

The TransactionLog constructor can't handle an existing file being present; it shouldn't be there. Should throw an exception in this case, NOT log a warning, leaving the object in a partially constructed state.

https://issues.apache.org/jira/browse/SOLR-17456

BTW I experienced this on a fork of Solr and I don't know the root cause. Since applying the fix in this PR, I have not seen it since (perhaps by chance). It should never happen!

Not sure if needs CHANGES.txt

The TransactionLog constructor can't handle an existing file being present; it shouldn't be there.  Should throw an exception in this case, NOT log a warning, leaving the object in a partially constructed state.

success = true;

assert ObjectReleaseTracker.track(this);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In addition to the scope of the PR, I did a little move of this line to the bottom where it's supposed to be.

@dsmiley
Copy link
Contributor Author

dsmiley commented Oct 30, 2024

I'm going to merge this in a couple days without further review. It's a super simple one.

@dsmiley dsmiley merged commit e849fd0 into apache:main Nov 4, 2024
@dsmiley dsmiley deleted the solr17456 branch November 4, 2024 22:32
dsmiley added a commit that referenced this pull request Nov 4, 2024
The TransactionLog constructor can't handle an existing file being present; it shouldn't be there.
Should throw an exception in this case, NOT log a warning which would leave the object in a partially constructed state.
This should happen in the first place, of course.  I see no evidence it has occurred.

(cherry picked from commit e849fd0)
tboeghk pushed a commit to otto-de/solr that referenced this pull request Feb 18, 2026
The TransactionLog constructor can't handle an existing file being present; it shouldn't be there.
Should throw an exception in this case, NOT log a warning which would leave the object in a partially constructed state.
This should happen in the first place, of course.  I see no evidence it has occurred.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant