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

fixes #701 #702 #703 #729 refactored out postgres callbacks and message bus usage #705

Closed
wants to merge 1 commit into from

Conversation

stalep
Copy link
Member

@stalep stalep commented Oct 3, 2023

Fixes Issue

Changes proposed

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@jesperpedersen jesperpedersen self-requested a review October 4, 2023 13:14
@jesperpedersen jesperpedersen added type/enhancement An enhancement to an existing feature branch/0.9.x The 0.9.x release labels Oct 4, 2023
@stalep stalep marked this pull request as ready for review October 13, 2023 06:00
@stalep stalep changed the title fixes #702 work in progress, still missing some logic when we delete labels fixes #702 refactored out postgres callbacks and message bus usage Oct 13, 2023
@stalep stalep changed the title fixes #702 refactored out postgres callbacks and message bus usage fixes #701 #702 #703 #729 refactored out postgres callbacks and message bus usage Oct 13, 2023
@johnaohara
Copy link
Member

Trying to add a new label to an existing schema is failing with the following exception:

2023-10-14 09:15:41,325 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-3) HTTP Request to /api/schema/1/labels failed, error id: caaf3619-6fa2-4c81-a6d0-91b4b51f1bb4-2: io.quarkus.arc.ArcUndeclaredThrowableException: Error invoking subclass method
	at io.hyperfoil.tools.horreum.svc.SchemaServiceImpl_Subclass.addOrUpdateLabel(Unknown Source)
	at io.hyperfoil.tools.horreum.svc.SchemaServiceImpl_ClientProxy.addOrUpdateLabel(Unknown Source)
	at io.hyperfoil.tools.horreum.api.services.SchemaService$quarkusrestinvoker$addOrUpdateLabel_36c89d04d369d1694a4cf9f6e63cafce6988aa22.invoke(Unknown Source)
	at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
	at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: jakarta.transaction.RollbackException: ARJUNA016102: The transaction is not active! Uid is 0:ffffc0a8446a:9e03:652a4c3f:450
	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1261)
	at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:104)
	at io.quarkus.narayana.jta.runtime.NotifyingTransactionManager.commit(NotifyingTransactionManager.java:70)
	at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.endTransaction(TransactionalInterceptorBase.java:406)
	at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:175)
	at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:107)
	at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.doIntercept(TransactionalInterceptorRequired.java:38)
	at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.intercept(TransactionalInterceptorBase.java:61)
	at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.intercept(TransactionalInterceptorRequired.java:32)
	at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired_Bean.intercept(Unknown Source)
	at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
	at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:70)
	at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:62)
	at io.hyperfoil.tools.horreum.server.BaseTransactionRetryInterceptor.intercept(BaseTransactionRetryInterceptor.java:29)
	at io.hyperfoil.tools.horreum.server.BaseTransactionRetryInterceptor_RequiredTransactionRetryInterceptor_Bean.intercept(Unknown Source)
	at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
	at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:30)
	at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)
	... 13 more

@stalep
Copy link
Member Author

stalep commented Oct 15, 2023

I've added an amqp queue for label update/add/delete.
I've not added a broker to podman/docker yet so atm the branch only works in dev mode.

@johnaohara
Copy link
Member

@stalep I agree with the general direction of messaging, but I think we should use the constructs that the smallrye reactive messaging library provides i.e: http://smallrye.io/smallrye-reactive-messaging/4.7.0/concepts/blocking/

The current implementation using the smallrye context propagation managedExecutor is not handling failures and will take 1000 messages per channel an enqueue them in memory. If horreum crashes, we will lose those messages because as far as the amq broker is concerned, they have been delivered. We also have 3 native context switches per message received, if we use the smallrye reactive messaging @Blocking annotation, I think we will only have 2

@jesperpedersen jesperpedersen added branch/0.10.x The 0.10.x and removed branch/0.9.x The 0.9.x release labels Oct 17, 2023
@jesperpedersen
Copy link
Collaborator

Merged w/ some disabled test cases.

Thanks for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/0.10.x The 0.10.x type/enhancement An enhancement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants