-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fix race condition during updates #1690
Conversation
df2133a
to
a4df639
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent!
@FroMage @franz1981 FYI we now have some variations of the Techempower stress tests included as integration tests within the Hibernate Reactive codebase, so at least the /updates
endpoint logic is being tested upstream.
N.B. in this case we don't use Quarkus but vertx-web, so it's not exactly like what we use in Techempower but it should covers our bases here.
Hibernate ORM can use the same update coordinator among multiple update operations. In Hibernate Reactive, the reactive update coordinator has a state that cannot be shared. So, we decided to create a new scoped coordinator for each update operation. Right now, we want to merge a fix for the issue that doesn't require us to copy or change code from Hibernate ORM. The plan is to find a more efficient solution as a separate issue. And, possible add some infrastructure to make it easier to track these type of issues.
Remove warnings and refactor the createion of the test tasks
a4df639
to
eeb1954
Compare
} | ||
|
||
private Future<Product> getProduct(RoutingContext ctx) { | ||
long id = Long.parseLong( ctx.pathParam( "id" ) ); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
|
||
postRequests.add( send ); | ||
} | ||
return all( postRequests ); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
.deployVerticle( () -> new ProductVerticle( () -> sf ), deploymentOptions ) | ||
.map( ignore -> webClient ) | ||
.compose( this::createProducts ) | ||
.map( ignore -> webClient ) |
Check notice
Code scanning / CodeQL
Useless parameter
.compose( this::createProducts ) | ||
.map( ignore -> webClient ) | ||
.compose( this::findProducts ) | ||
.onSuccess( res -> context.completeNow() ) |
Check notice
Code scanning / CodeQL
Useless parameter
.deployVerticle( () -> new WorldVerticle( () -> sf ), deploymentOptions ) | ||
.map( ignore -> webClient ) | ||
.compose( this::createData ) | ||
.map( ignore -> webClient ) |
Check notice
Code scanning / CodeQL
Useless parameter
.compose( this::createData ) | ||
.map( ignore -> webClient ) | ||
.compose( this::updates ) | ||
.onSuccess( res -> context.completeNow() ) |
Check notice
Code scanning / CodeQL
Useless parameter
Fix #1687
Fix #1686