You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "ThomasTaketurns (via GitHub)" <gi...@apache.org> on 2023/03/13 09:25:47 UTC

[GitHub] [pulsar] ThomasTaketurns commented on issue #19784: [Bug] Deadlock on Pulsar Java client side

ThomasTaketurns commented on issue #19784:
URL: https://github.com/apache/pulsar/issues/19784#issuecomment-1465786623

   @lifepuzzlefun , Hi, we are still trying to find the good race condition/scenario to reproduce the issue so I do not have code to sistematically reproduce.
   
   I can still share parts of our code though : 
   
   This is where the 24 threads are waiting (first line) : 
   
   **final Transaction txn = this.getClient().newTransaction().withTransactionTimeout(1, TimeUnit.MINUTES)
   					.build().get();**
   			for (final TakeTurnsEvent<E, DomainEvent<E>> event : events) {
   				@SuppressWarnings("rawtypes") final TypedMessageBuilder<PulsarEvent> message = this.getProducer().newMessage(txn);
   				message.eventTime(System.currentTimeMillis());
   				message.key(event.getEntityId().toString());
   				message.value(event.toPulsarEvent(this.schemaRegistry));
   				message.property("traceId", Span.current().getSpanContext().getTraceId());
   				message.property("spanId", Span.current().getSpanContext().getSpanId());
   				log.info("Sending event to Pulsar : {} ", event);
   				message.sendAsync();
   			}
   			txn.commit();
   
   This is the only place where I found our code in the stack traces.
   
   Let me know if I can share anything else.
   
   Thanks,
   
   Thomas
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org