bug #6664
closedDeleting often does not succeed without throwing an exception
100%
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
Updated by Andreas Müller about 6 years ago
- Found in Version changed from Release 4.6 to Release 4.7
Updated by Andreas Müller about 6 years ago
Observed also in several versions before 4.7
Updated by Katja Luther about 6 years 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.
Updated by Katja Luther about 6 years 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.
Updated by Katja Luther about 6 years ago
- Status changed from New to Resolved
- Assignee changed from Katja Luther to Andreas Müller
Updated by Andreas Müller about 6 years 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)
Updated by Katja Luther almost 6 years ago
- Status changed from Feedback to Resolved
- % Done changed from 0 to 50
Applied in changeset taxeditor|9efc697ec714f60e08bf87f84fb1b509d35d2780.
Updated by Katja Luther almost 6 years 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.
Updated by Katja Luther almost 6 years ago
- Status changed from Feedback to Resolved
- Assignee changed from Katja Luther to Andreas Müller
Updated by Katja Luther almost 6 years ago
- % Done changed from 0 to 50
Applied in changeset taxeditor|eb057b290c3a0f9c34066b5392657ce2dfc00e9b.
Updated by Andreas Müller almost 6 years ago
- Related to feature request #6527: Refactor delete configurator for media added
Updated by Andreas Müller almost 6 years 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.
Updated by Katja Luther almost 6 years ago
- Status changed from Feedback to Closed
This fix was in the deleteHandler for all bulk editors, so it works for all bulkeditors