Project

General

Profile

bug #7538

Concurrent editing transaction strategy: Taxon turned into synonym by other user prior to saving taxon which was modified in editor

Added by Andreas Kohlbecker about 1 year ago. Updated about 1 year ago.

Status:
New
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
07/09/2018
Due date:
% Done:

0%

Severity:
critical
Found in Version:

Description

** Originally reported as:**

Liebes Edit-Team,

Manchmal erscheint dieser Fehler, wenn man nach Eingabe der Type Designations und der Referenz speichern möchte. Nach schließen des Fensters für das entsprechende Taxon geht zwar alles wieder, aber ich dachte, ich mache trotzdem mal Meldung.

Herzlichen Gruß

Johanna

login : j.bellack

editor version : 5.1.2

server : api.cybertaxonomy.org (cybertaxonomy.org) / caryophyllales_spp

schema version : 5.0.0.0.20180514

os : Windows 7 6.1 amd64

java : 1.8.0_171

org.eclipse.e4.core.di.InjectionException: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [eu.etaxonomy.cdm.model.taxon.TaxonNode#19650]
...

Analysis of the Problem:

Hallo Johanna,

Das Taxon für dessen Namen du die TypeDesignation bearbeitet hattest, wurden anscheinend von einem anderen User gelöscht bevor du deine Änderungen gespeichert hast.
Wenn meine Analyse richtig ist handelt es sich um Iresine frutescens Moq.. Nach den Tabellen in denen die Historie der Daten gespeichert wird, sieht es so aus, als ob Walter am 2018-07-09 11:59:41 das zu diesem Namen gehörende Taxon in ein Synonym umgewandelt und damit den Taxon-Knoten in der Klassifikation gelöscht hat.

Solche Konflikte werden im CDM leider noch nicht derart abgefangen, so dass dem User ein erklärender Hinweis angezeigt wird.

Das ist ein wirklich anschauliches Beispiel für die fehlende Funktionalität. Ich lege gleich noch ein Ticket dafür an, in dem ich weitere, technische Information verewigen werde.

Viele Grüße
Andreas K.

Further details:

According to the auditing tables the TaxonNode was deleted as

[TaxonNode_AUD]:

19650   53646   0   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 01:48:10 0               10  397 20124       35059   #t10#1986#12#397#19650# 26  0   0
19650   53656   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 01:48:21 0               10  397 20124       35059   #t10#1986#12#397#19650# 27  0   0
19650   53663   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 07:11:17 0               10  397 20124       35059   #t10#1986#12#397#19650# 28  0   0
19650   53669   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 07:33:27 0               10  397 20124       35059   #t10#1986#12#397#19650# 29  0   0
19650   53672   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 07:53:18 0               10  397 20124       35059   #t10#1986#12#397#19650# 30  0   0
19650   53673   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 07:59:47 0               10  397 20124       35059   #t10#1986#12#397#19650# 31  0   0
19650   53677   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 08:26:04 0               10  397 20124       35059   #t10#1986#12#397#19650# 32  0   0
19650   53678   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 08:45:13 0               10  397 20124       35059   #t10#1986#12#397#19650# 33  0   0
19650   53684   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 08:47:02 0               10  397 20124       35059   #t10#1986#12#397#19650# 34  0   0
19650   53686   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 08:55:47 0               10  397 20124       35059   #t10#1986#12#397#19650# 35  0   0
19650   53793   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-05 09:02:09 0               10  397 20124       35059   #t10#1986#12#397#19650# 34  0   0
19650   53797   1   2018-07-05 01:48:02 eb614dc2-95bd-4acf-aa29-344282da8c64    2018-07-06 12:26:07 0           50  10  397 20124       35059   #t10#1986#12#397#19650# 33  0   0
19650   54042   2                                                                                                   

The TaxonNode was referring to the TaxonBase 35059.

This has been deleted

[TaxonbBase_AUD]:

Taxon   35059   53626   0   2018-07-05 01:26:43 b77a4dbb-eccf-44f1-b061-6267873e85e5                            0   Iresine frutescens Moq. sec. WFO-Import Amara-Cheno-Polyg-Dianthus June 2018        0   0           33369   20124   0   1                   
Taxon   35059   53646   1   2018-07-05 01:26:43 b77a4dbb-eccf-44f1-b061-6267873e85e5                            0   Iresine frutescens Moq. sec. WFO-Import Amara-Cheno-Polyg-Dianthus June 2018        0   0           33369   20124   0   1                   
Taxon   35059   54042   2                                                                                                                                                                       

and was transformed into a Synonym.

[TaxonbBase]:

Synonym 38762   2018-07-09 11:59:41 2e3e8e56-080e-4721-a5bd-0cf3ab1dcb85    2018-07-09 11:59:42                     0   Iresine frutescens Moq. syn. sec. WFO-Import Amara-Cheno-Polyg-Dianthus June 2018       0   0       50  50  33369   20124   1               870 33984

The user id 50 references Walter


NOTE: A general problem or caveat of the data in the audit tables are lacking a timestamp of the operation and of the user which was responsible. => [by AM]: timestamp is available when joining with AuditEvent table, for responsible user a new ticket has been created: #7604


Related issues

Copied to Edit - feature request #7604: Add user to AuditEvent New 07/30/2018

History

#1 Updated by Patrick Plitzner about 1 year ago

This could also be related to the same problem of concurrent editing:

"...mal wieder ein hübscher kleiner Fehler beim Verschieben eines Homotypens eines Heterotypen zu einem anderen Heterotypen..."

login : j.bellack

editor version : 5.1.2

server : api.cybertaxonomy.org (cybertaxonomy.org) / caryophyllales_spp

schema version : 5.0.0.0.20180514

os : Windows 7 6.1 amd64

java : 1.8.0_171

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException: CDM Entity of type eu.etaxonomy.cdm.model.name.TaxonName with id 32296 is null.)

                at org.eclipse.swt.SWT.error(SWT.java:4533)

                at org.eclipse.swt.SWT.error(SWT.java:4448)

                at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)

                at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)

                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)

                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)

                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)

                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)

                at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)

                at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)

                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)

                at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)

                at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)

                at eu.etaxonomy.taxeditor.Application.start(Application.java:24)

                at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)

                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)

                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)

                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                at java.lang.reflect.Method.invoke(Unknown Source)

                at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)

                at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)

                at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

Caused by: java.lang.NullPointerException: CDM Entity of type eu.etaxonomy.cdm.model.name.TaxonName with id 32296 is null.

                at eu.etaxonomy.taxeditor.service.CachedCommonServiceImpl.find(CachedCommonServiceImpl.java:43)

                at org.hibernate.proxy.AbstractLazyInitializer.remoteInitialize(AbstractLazyInitializer.java:451)

                at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167)

                at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:297)

                at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:68)

                at eu.etaxonomy.cdm.model.name.TaxonName_$$_jvst5da_9.getUuid(TaxonName_$$_jvst5da_9.java)

                at eu.etaxonomy.cdm.model.common.CdmBase.equals(CdmBase.java:385)

                at eu.etaxonomy.cdm.model.common.VersionableEntity.equals(VersionableEntity.java:113)

                at eu.etaxonomy.cdm.model.taxon.HomotypicGroupTaxonComparator.getFirstNameInGroup(HomotypicGroupTaxonComparator.java:207)

                at eu.etaxonomy.cdm.model.taxon.HomotypicGroupTaxonComparator.compareBasionyms(HomotypicGroupTaxonComparator.java:176)

                at eu.etaxonomy.cdm.model.taxon.HomotypicGroupTaxonComparator.compare(HomotypicGroupTaxonComparator.java:130)

                at eu.etaxonomy.cdm.model.taxon.TaxonComparator.compare(TaxonComparator.java:1)

                at java.util.TimSort.countRunAndMakeAscending(Unknown Source)

                at java.util.TimSort.sort(Unknown Source)

                at java.util.Arrays.sort(Unknown Source)

                at java.util.ArrayList.sort(Unknown Source)

                at java.util.Collections.sort(Unknown Source)

                at eu.etaxonomy.cdm.model.taxon.Taxon.getSynonymsInGroup(Taxon.java:1552)

                at eu.etaxonomy.cdm.model.taxon.Taxon.getSynonymsInGroup(Taxon.java:1529)

                at eu.etaxonomy.taxeditor.editor.name.e4.container.AbstractHomotypicalGroupContainerE4.getSynonyms(AbstractHomotypicalGroupContainerE4.java:42)

                at eu.etaxonomy.taxeditor.editor.name.e4.container.HomotypicalSynonymGroupE4.createSynonymContainer(HomotypicalSynonymGroupE4.java:41)

                at eu.etaxonomy.taxeditor.editor.name.e4.container.HomotypicalSynonymGroupE4.createContainers(HomotypicalSynonymGroupE4.java:33)

                at eu.etaxonomy.taxeditor.editor.name.e4.container.AbstractGroupE4.redraw(AbstractGroupE4.java:161)

                at eu.etaxonomy.taxeditor.editor.name.e4.container.AbstractGroupE4.postOperation(AbstractGroupE4.java:155)

                at eu.etaxonomy.taxeditor.operation.AbstractPostOperation.postExecute(AbstractPostOperation.java:72)

                at eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicGroupOperation.execute(ChangeHomotypicGroupOperation.java:104)

                at eu.etaxonomy.taxeditor.model.AbstractUtility.lambda$3(AbstractUtility.java:141)

                at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:162)

                at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:154)

                at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)

                at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)

                ... 23 more

#2 Updated by Andreas Müller about 1 year ago

  • Subject changed from Concurrent modification problem: Taxon turned into synonym by other user pritor saving taxon which was modified in editor to Concurrent editing transaction strategy: Taxon turned into synonym by other user prior to saving taxon which was modified in editor
  • Priority changed from New to Highest
  • Severity changed from normal to critical

#4 Updated by Andreas Müller about 1 year ago

Patrick Plitzner wrote:

This could also be related to the same problem of concurrent editing:

"...mal wieder ein hübscher kleiner Fehler beim Verschieben eines Homotypens eines Heterotypen zu einem anderen Heterotypen..."

Not sure. Strange here is that no delete event exists in TaxonName_AUD. However, in TaxonName the object does not exist anymore.

2 taxa exist that did use the name: taxon 33986 (deleted with REV 53772) and synonym 38657 (created with same REV 53772 and deleted with REV 53790).

This may happen when only the AUD event fails to commit and an exception is thrown instead. We also need to handle this case somehow (if a failing audit event commit is the reason).

SELECT *
FROM TaxonName_AUD tn
WHERE tn.id = 32296

SELECT *
FROM TaxonName tn
WHERE tn.id = 32296

SELECT ev.*, tb.*
FROM TaxonBase_AUD tb INNER JOIN AuditEvent ev ON ev.revisionnumber = tb.REV
WHERE tb.name_id = 32296 OR tb.id IN (33986, 38657)
ORDER BY tb.id

#5 Updated by Andreas Müller about 1 year ago

  • Description updated (diff)

#6 Updated by Andreas Müller about 1 year ago

Andreas Kohlbecker wrote:

NOTE: A general problem or caveat of the data in the audit tables are lacking a timestamp of the operation and of the user which was responsible.

timestamp is available when joining with AuditEvent table, for responsible user a new ticket has been created: #7604

#7 Updated by Andreas Müller about 1 year ago

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)