Opened 8 years ago
Closed 8 years ago
#2059 closed defect (fixed)
Problems to abort plug-ins that use the snapshot manager to load annotations
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | minor | Milestone: | BASE 3.10.1 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
I have noted that some plug-ins that use the SnapshotManager
to load annotation values can be problematic to abort (for example the release exporter plugin in Reggie). It may work at some times, but mostly it doesn't. The job dialog will display "Aborting..." but that status messages and progress information is updated as normal.
Changing the plug-in so that it doesn't use the snapshot manager makes the problem go away.
Change History (7)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Milestone: | BASE 3.11 → BASE 3.10.1 |
---|---|
Priority: | major → minor |
Resolution: | → fixed |
Status: | new → closed |
comment:3 by , 8 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:4 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:5 by , 8 years ago
Status: | new → assigned |
---|
comment:6 by , 8 years ago
(In [7305]) References #2059: Problems to abort plug-ins that use the snapshot manager to load annotations
The interrupted status is set re-enabled on the current thread if it was interrupted while waiting for a lock. This should allow higher-level code to handle the interrupt and abort functionality seems to work again as expected.
comment:7 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
After investigating this issue the problem has been located in the StaticCache.aquireLock() method.
The implementation will catch the thread interruption from the "Abort" action and continue without loading anything from the cache. The snapshot manager uses the static cache to load stored annotation snapshots and when it doesn't get any cached information it will continue and load it from the database instead.
The
StaticCache
code need to be fixed so that it doesn't swallow the interrupt.I also think the
ThreadSignalHandler
implementation should maintain a status flag if an abort command has been sent or not. The it would be possible to implment a (temporary) workaround in case we discover other places in the BASE core that swallows the interrupt signal.