MDC properties inconsistency in health checks after recent update #47481
-
Hello, We have recently updated a project to the LTS ( I am not sure whether the same problem has reoccurred, or if anything else has happened, that is leading to this inconsistency. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 19 replies
-
Beta Was this translation helpful? Give feedback.
-
Hi @atanasnik, that's strange, nothing change in this code. I will double-check the original reproducer but I'm also working on a major update of SR Health that might help with this too. |
Beta Was this translation helpful? Give feedback.
-
@atanasnik I updated my reproducer to the latest Quarkus 3.21.4 - https://github.com/xstefank/quarkus-reproducers/tree/main/mdc-propagation and it still seems to work. I tried also with 3.20.0 and I also can't reproduce it. EDIT: I also added a test that calls all health check 100000 times and it passes - https://github.com/xstefank/quarkus-reproducers/blob/main/mdc-propagation/src/test/java/org/acme/MDCLoggingTest.java. Can you reproduce it all the time? |
Beta Was this translation helpful? Give feedback.
-
Hi @atanasnik, unfotunatelly, I can't figure out what MDC does to mess up Vertx context that is otherwise provided by Quarkus. But I was able to fix your use case by overriding the QuarkusAsyncHealtchCheckFactory to use a new vertx instance - xstefank/quarkus-reproducers@fddaf23. I must say that I don't think this is a correct solution but I don't understand VertxMDC enough to be sure that any changes that I make won't break other behaviours which are now tight to threads. Let me know if this will work for you or not please. |
Beta Was this translation helpful? Give feedback.
-
@atanasnik can you try this PR in your application please? #48009 |
Beta Was this translation helpful? Give feedback.
-
@atanasnik, the PR was rejected for valid reasons, and I closed it. But in the end, I think I found out what the issue is. If you can give it another spin with this new PR, I would like to have your ack -> #48057. |
Beta Was this translation helpful? Give feedback.
-
Hello! I was now able to see the discussion on #48678. I just wanted to check if the problem we discussed in the current issue is considered resolved as of the latest Quarkus version, or if other related problems need to be addressed first for this one to be considered finalized. Thank you! |
Beta Was this translation helpful? Give feedback.
We fixed the broken Vert.x duplicated context behavior.