question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Data loss after update to Quarkus 1.10.5

See original GitHub issue

I was running on Quarkus 1.9.1. I recently updated directly to 1.10.5 I started seeing some db entries get wiped out, when accessing a related table. I have been able to reproduce it in my environment with a simple db read now. I use postgres, panache, hibernatesearch among other extensions.

It basically boils down to something like

@Entity
@RegisterForReflection
@Table(name = "books")
@Indexed
public class Book extends PanacheEntityBase implements Serializable {
//various fields...
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(updatable = false, name = "shop_id")
@JsonbTransient
private Shop shop;
}

What happens is when I call Book.findById(), the data in the corresponding Shop entity gets set to null. I am not sure if there is something wrong, in the way I have written the entity, but this used to work in 1.9

I then took Quarkus v1.10.3 I now get an exception in the same sequence.

14:01:19.625 WARN [co.ar.at.arjuna] beforeCompletion ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffffc0a80e70:adb1:5ff8578d:8, org.hibernate.resource.transaction.backend.jta.internal.synchronization.RegisteredSynchronization@147062e3 >: java.lang.NullPointerException
at org.hibernate.persister.entity.AbstractEntityPersister.lambda$resolveDirtyAttributeIndexes$0(AbstractEntityPersister.java:2282)
at java.base/java.util.BitSet$1BitSetSpliterator.forEachRemaining(BitSet.java:1283)

Since the transaction fails, I dont have data loss, but looks like something is trying to overwrite the shop entity Commenting out the Shop entity from Book, causes everything to work ok, in both versions I have tracked down the change in behaviour to the CRM changes in 1.10.4

I have been able to reproduce this reliably in my environment, but havent been able to create a standalone example.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
dreab8commented, Jan 29, 2021
2reactions
dreab8commented, Jan 28, 2021

Thanks @yntelectual for the reproducer, I’m going to give a look at it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quarkus 1.10.5.Final released - Bugfixes
It fixes some important issues in Quarkus, most notably in the Hibernate ORM extension which got Hibernate ORM upgraded to 5.4.26.Final.
Read more >
Chapter 1. Troubleshooting Red Hat Advanced Cluster ...
After you provision an OpenShift Container Platform cluster with Red Hat Advanced Cluster Management, reimporting the cluster might fail with a x509: ...
Read more >
chore(deps): update dependency io.quarkus:quarkus ... - GitLab
An error occurred while retrieving approval data for this merge request. chore(deps): update dependency io.quarkus:quarkus ...
Read more >
Spring Boot, Quarkus, Micronaut, Helidon - Foojay
The second bump was that Oracle lost interest in Java EE as it didn't generate enough (any?) revenue. Java EE found a new...
Read more >
Security vulnerabilities - Quarkus - CVE Details
# CVE ID CWE ID Vulnerability Type(s) Publish Date Update Date Score Gaine... 1 CVE‑2022‑21724 665 Exec Code 2022‑02‑02 2022‑11‑09 7.5 None 2 CVE‑2022‑21363 2022‑01‑19...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found