Project

General

Profile

bug #6664

Deleting often does not succeed without throwing an exception

Added by Andreas Müller over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
05/22/2017
Due date:
% Done:

100%

Severity:
critical
Found in Version:

Description

I did now observe several times that when deleting multiple objects (of the same type) in bulk editor the delete sometimes does not make it into the database. However, no exception is thrown. The only way to test the result is to rerun the search and see if the record is still there.

Until now I have no yet recognized a pattern when it is successful. Last time I observed it was when deleting about 20 media from flora of cyprus. I only know that once a record can not be deleted in an opened bulk editor the chance to get it deleted in the same bulk editor is small (or not existing). At least one needs to reopen the bulk editor. Even better restart the TaxEditor.

As it is absolutely unclear why and when it happens.

This is a very critical issue as we don't know if it limited only on deleting. Maybe also other operations are affected.
Interesting is also that I never observed it when deduplicating data (e.g. I deduplicated ~1400 "L." entries in AgentBase without problem).

I don't know if this is a TaxEditor, cdmlib or cdmserver issue.


Related issues

Related to Edit - feature request #6527: Refactor delete configurator for media Closed 03/21/2017

Associated revisions

Revision 549f7853 (diff)
Added by Katja Luther over 1 year ago

ref #6664: fix problem of not deleted objects in bulkeditor by setting offset = 1 if offset = 0

Revision 9efc697e (diff)
Added by Katja Luther over 1 year ago

fix #6664: fix delete in bulkeditor

History

#1 Updated by Andreas Müller over 1 year ago

  • Found in Version changed from Release 4.6 to Release 4.7

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

Observed also in several versions before 4.7

#3 Updated by Katja Luther over 1 year ago

At a first view it seems to be a problem of the handling of the annotatedline editor model. sometimes the object selected and the object passed to the deleteHandler are not the same.

This problem appears when:

  • the first element of the list is selected for deletion -> this operation fails because the selection has position and length 0.-> the annotation is not marked deleted.

  • the next delete operation fails because the selected element is still the one of the last delete operation -> no annotation is found for this element at the selected position

  • but sometimes the length of the selection is not 0 ???? then everything works fine.

#4 Updated by Katja Luther over 1 year ago

The problem is the offset of the selection when the cursor is at the beginning of the first line because the method model.getAnnotationIterator(offset, length, true, true)
returns an iterator with no entries.

set offset to 1 if it is 0 solves the problem, seems not to be very nice, but I do not find a better solution.

#5 Updated by Katja Luther over 1 year ago

  • Status changed from New to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

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

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

It is better already but 2 things still happen.

1) If the cursor is at the end of the above described problem still occurs. The record is deleted from the Editor but not deleted during save. It appears again after save

2) very view times nothing happens at all by save. The record is still visible in the Editor. This is less critical as it is more obvious to the user. Nevertheless we should find out why this happens. Unfortunately I did not yet find a pattern when this happens.

I tested with media data in cyprus test database searching for "G*". I deleted most of the existing media data. (there is another issue described in #6527#note-6)

#7 Updated by Katja Luther over 1 year ago

  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 50

#8 Updated by Katja Luther over 1 year ago

  • Status changed from Resolved to Feedback
  • % Done changed from 50 to 0

The deleteHandler used the offset and length to get the annotation from the model to set it markedForDeletion, but this method does not work as expected. Now the annotation got by the object that should be deleted, is used.

#9 Updated by Katja Luther over 1 year ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

#10 Updated by Katja Luther over 1 year ago

  • % Done changed from 0 to 50

#11 Updated by Andreas Müller over 1 year ago

#12 Updated by Andreas Müller over 1 year ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

A first check looks fine. I only tested with Media. Is the fix for ALL bulk editors? If no, could you please implement it for all. Otherwise we can close the ticket.

#13 Updated by Katja Luther over 1 year ago

  • Status changed from Feedback to Closed

This fix was in the deleteHandler for all bulk editors, so it works for all bulkeditors

#14 Updated by Andreas Müller over 1 year ago

  • % Done changed from 50 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)