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

Gh 4581 remove jerven design mistakes #4582

Merged
merged 2 commits into from
May 31, 2024

Conversation

JervenBolleman
Copy link
Contributor

GitHub issue resolved: #

Briefly describe the changes proposed in this PR:

Remove LimitedSize evaluation strategy code, as well as a few methods in the EvaluationStrategy API that was replaced by the collection factory API.

Closes #4581

@JervenBolleman JervenBolleman added the 🛠️ tech debt code refactoring, deprecation, and other technical debt tasks label May 21, 2023
@JervenBolleman JervenBolleman added this to the 5.0.0 milestone May 21, 2023
@JervenBolleman JervenBolleman self-assigned this May 21, 2023
@JervenBolleman JervenBolleman changed the base branch from main to develop May 21, 2023 20:03
@JervenBolleman JervenBolleman force-pushed the GH-4581-Remove-Jerven-Design-Mistakes branch from b12ed0f to 4b30d24 Compare April 26, 2024 14:28
@JervenBolleman JervenBolleman force-pushed the GH-4581-Remove-Jerven-Design-Mistakes branch 2 times, most recently from b241e9b to f8f7eee Compare April 26, 2024 16:45
@JervenBolleman
Copy link
Contributor Author

@hmottestad could this still be included in the next 5.x Milestone build?

@hmottestad
Copy link
Contributor

@hmottestad could this still be included in the next 5.x Milestone build?

Yeah. I haven't started on the build process yet. I saw you requested a review from me, so I'll take a look asap.

try {
cf.close();
} catch (QueryEvaluationException e) {
super.handleClose();
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this maybe be try-finally or is super.handleClose() only supposed to be called when there is an exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be a try-finally, although right now super.handleClose is a noop. That could change in the future.
will-fix.

@JervenBolleman JervenBolleman force-pushed the GH-4581-Remove-Jerven-Design-Mistakes branch from f8f7eee to 95acc2a Compare May 31, 2024 13:02
@hmottestad
Copy link
Contributor

From what I understand looking through the code you've moved the set creation to a higher level in the code (EvaluationFactory?) so that it's easier to override in the specific stores.

Only issue I found in your code was the try-catch instead of try-finally. If you're happy with everything then you can go ahead and merge.

As well as supplier methods later better done with the collection
factory API.
This allows to always be sure that we can fall back to disk if required.
Also allows optimized datastructures to be injected.
@JervenBolleman JervenBolleman force-pushed the GH-4581-Remove-Jerven-Design-Mistakes branch from 95acc2a to 07e4174 Compare May 31, 2024 14:50
@JervenBolleman
Copy link
Contributor Author

From what I understand looking through the code you've moved the set creation to a higher level in the code (EvaluationFactory?) so that it's easier to override in the specific stores.

Only issue I found in your code was the try-catch instead of try-finally. If you're happy with everything then you can go ahead and merge.

Yes. Exactly, now with collection factories one does not need to extend the store. One can just inject the limited size collections. Also now there are fewer and fewer places left where collections are not coming from a collection factory that can spill to disk. So the original goal I had with these LimitedSize* all those years ago is no longer valid.

@JervenBolleman JervenBolleman enabled auto-merge (rebase) May 31, 2024 14:53
@JervenBolleman JervenBolleman merged commit a58ff06 into develop May 31, 2024
9 checks passed
@JervenBolleman JervenBolleman deleted the GH-4581-Remove-Jerven-Design-Mistakes branch May 31, 2024 15:03
@hmottestad hmottestad added the M3 label Jun 5, 2024
@hmottestad hmottestad removed this from the 5.0.0 milestone Jun 5, 2024
@hmottestad hmottestad removed 🛠️ tech debt code refactoring, deprecation, and other technical debt tasks M3 labels Jun 5, 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.

Remove my own design errors with v5
2 participants