Opened 5 years ago

Closed 5 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 Changed 5 years ago by Nicklas Nordborg

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.

comment:2 Changed 5 years ago by Nicklas Nordborg

Milestone: BASE 3.11BASE 3.10.1
Priority: majorminor
Resolution: fixed
Status: newclosed

comment:3 Changed 5 years ago by Nicklas Nordborg

Resolution: fixed
Status: closedreopened

comment:4 Changed 5 years ago by Nicklas Nordborg

Owner: changed from everyone to Nicklas Nordborg
Status: reopenednew

comment:5 Changed 5 years ago by Nicklas Nordborg

Status: newassigned

comment:6 Changed 5 years ago by Nicklas Nordborg

(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 Changed 5 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

(In [7306]) Fixes #2059: Problems to abort plug-ins that use the snapshot manager to load annotations

Added ThreadSignalHandler.hasRecieved() method to make it possible to check if an ABORT signal has been received even if the threads interrupt flag has been reset by some other code.

Note: See TracTickets for help on using tickets.