Opened 9 months ago

Closed 9 months ago

#2059 closed defect (fixed)

Problems to abort plug-ins that use the snapshot manager to load annotations

Reported by: nicklas Owned by: nicklas
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 9 months ago by nicklas

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 9 months ago by nicklas

  • Milestone changed from BASE 3.11 to BASE 3.10.1
  • Priority changed from major to minor
  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 9 months ago by nicklas

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 Changed 9 months ago by nicklas

  • Owner changed from everyone to nicklas
  • Status changed from reopened to new

comment:5 Changed 9 months ago by nicklas

  • Status changed from new to assigned

comment:6 Changed 9 months ago by nicklas

(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 9 months ago by nicklas

  • Resolution set to fixed
  • Status changed from assigned to closed

(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.