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

feat: flow instead of exceptions in resolver #942

Conversation

aepfli
Copy link
Member

@aepfli aepfli commented Sep 7, 2024

…g not found errors

Exceptions are expensive GOTO statements, and in a performance relevant system not the best to be used for control flow . A FlagNotFound-Error can be expected, but the performance draw backs of exception in this case not.

relates to: open-feature/java-sdk#1095

@aepfli aepfli requested a review from a team as a code owner September 7, 2024 15:47
@aepfli aepfli force-pushed the issue/Use_Details_rather_than_exceptions branch from 8961523 to ddae11d Compare September 7, 2024 15:48
@Kavindu-Dodan
Copy link
Collaborator

This should align with open-feature/java-sdk#1095 to avoid the loss of error hook invocations :)

@toddbaert toddbaert changed the title feat(flagd-inprocess): Use program flow instead of exceptions for fla… feat: flow instead of exceptions in resolver Sep 17, 2024
@toddbaert
Copy link
Member

This should align with open-feature/java-sdk#1095 to avoid the loss of error hook invocations :)

I think there's no behavioral change here, since even before the PR you mention, if errorCode was null we threw an exception to cause the error hook invokation.

@toddbaert toddbaert self-requested a review September 17, 2024 13:23
aepfli and others added 2 commits September 17, 2024 19:56
…g not found errors

Exceptions are expensive GOTO statements, and in a performance
relevant system not the best to be used for control flow
. A FlagNotFound-Error can be expected, but the performance
draw backs of exception in this case not.

Signed-off-by: Simon Schrottner <[email protected]>
…s/flagd/resolver/process/InProcessResolver.java

Co-authored-by: Todd Baert <[email protected]>
Signed-off-by: Simon Schrottner <[email protected]>
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.

5 participants