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

Upgrade spring boot and spring data #558

Merged
merged 1 commit into from
Jul 8, 2022
Merged

Upgrade spring boot and spring data #558

merged 1 commit into from
Jul 8, 2022

Conversation

elefeint
Copy link
Contributor

@elefeint elefeint commented Jul 7, 2022

The individual dependabot upgrades seem to have failed because of a mismatch between autoconfigured Spring Boot objects and the functionality available.

I probably still want to track down where the reactive stream gets disconnected on runtime API mismatch (MethodNotFound or some such). It would be hard for users to troubleshoot.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@elefeint elefeint requested a review from zhumin8 July 7, 2022 17:13
@elefeint
Copy link
Contributor Author

elefeint commented Jul 8, 2022

The underlying issue was our old friend, handling of Exception vs Error, but with a Project Reactor twist.
The root cause, an incompatibility between different Spring projects' versions, resulted in a runtime error java.lang.NoSuchMethodError: 'java.lang.Object org.springframework.data.mapping.model.ParameterValueProvider.getParameterValue(org.springframework.data.mapping.Parameter)'.

Note two things:

  1. it's an Error, so not actually meant to be caught by anything
  2. it extends from java.lang.LinkageError, which project reactor considers unrecoverable. Which, fair. However, the presentation of all of this is that a flux subscription simply hangs.

Based on explanation in reactor/reactor-core#3036, this works as intended. This is understandable -- the exception ends up rethrown by Reactor layers, as Java intended. But because in our case, the caller is Spanner async API, the error ends up propagating there and also never getting logged.

What I think I'll do as follow-up is have a second catch block in ReactiveResultSetCallback that would handle Throwable (because there is no point handing it to Spanner async API), finish the async callback gracefully, and log the error. Unfortunately, the sink ends up being in a weird state, so the subscriber is still out of luck, but at least the error will be visible.

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.

2 participants