Project

General

Profile

bug #9520

Taxonnode parent merge cascade leads to non-transactional behavior

Added by Andreas Müller 8 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Highest
Category:
taxeditor
Target version:
Start date:
03/05/2021
Due date:
% Done:

100%

Severity:
critical
Found in Version:

Description

If a taxon node is changed and saved the update result also contains its parent and also grandparents up to the classification. This can be seen in the session view of the TaxEditor When saving again all these objects are also merged.

This is not only a performance issue for deeper classifications but it also leads to a situation that if the parent was edited and saved in the meanwhile this editing gets lost because the parent state of the child is saved afterwards.

This behavior can be reproduced by:

  • Open parent and child
  • Change child (e.g. publish flag) and save
  • Change parent (e.g. publish flag) and save
  • Change child again and save

Reopen parent => it has the state from before the change

This is critical.

====

NOTE: Before closing: think about removing SaveOrUpdateEntityListener. It is currently not used anymore.

Associated revisions

Revision 76512e45 (diff)
Added by Andreas Müller 8 months ago

ref #9520 try to remove cascade from TaxonNode.parent

Revision 117f7bd2 (diff)
Added by Andreas Müller 8 months ago

ref #9520 fix TaxonNodeNaturalComparator for nodes without treeindex (should not really happen)

Revision fd734dc9 (diff)
Added by Andreas Müller 8 months ago

ref #9520 fix ClassificationServiceImpl und TaxonServiceImplTest for non-cascading parent node

Revision 16076af1 (diff)
Added by Andreas Müller 8 months ago

ref #9520 move treeIndex update to CdmPreDataChangeListener as SaveOrUpdateEntityListener is not always fired

(only when object is explicitly saved or updated)

Revision 27b9e776 (diff)
Added by Andreas Müller 8 months ago

ref #9520 fix TaxonNodeServiceImplTest after treeIndex is now correctly triggered

Revision c5ec3f4d (diff)
Added by Andreas Müller 8 months ago

ref #9520 fix FeatureNodeServiceImplTest which had incorrect test data

Revision ea17bbe6 (diff)
Added by Andreas Müller 8 months ago

ref #9520 try to fix failing addTaxonNodeCascadeProblem by persisting child first

History

#1 Updated by Andreas Müller 8 months ago

  • Status changed from New to Resolved
  • Assignee changed from Andreas Müller to Katja Luther
  • Priority changed from New to Highest
  • % Done changed from 0 to 50

This needs intensive reviewing as I removed cascading taxon node to parent.

I tested already that the problem itself is solved. I tested the steps from the description and now the new state remains after the child was saved.

#2 Updated by Andreas Müller 7 months ago

  • Description updated (diff)

#3 Updated by Katja Luther 7 months ago

  • Status changed from Resolved to Closed
  • Assignee changed from Katja Luther to Andreas Müller
  • % Done changed from 50 to 100

Seems to work as expected.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)