collection store detects two new files (thus matching trigger condition)
collection store triggers data prep
data prep executes and then signals collection store
collection store updates state but only partially (current -> old)
marks the two current files as old, but since there are no new files, there is nothing considered "new"
collection store signals data prep to execute
data prep waits for collection store
collection store goes into waiting state to wait for data prep
deadlock happens because collection store can't proceed to update its state because:
collection store is waiting for data prep to finish executing before updating its state,
but data prep cannot finish executiong because it is waiting on collection store to update its state;
this happens because the resource nodes call update_state() after check_successors()
bug descriptions:
data prep executes before new data is detected
possible fixes:
make resource nodes signal action nodes before the check_predecessors call
make sure the resource node doesn't signal the action node unless there's a change of state
move update_state() function call to monitoring thread so it isn't blocked by execution of data prep
resource nodes
final resolution:
split update_state() function into two separate functions:
new_to_current(): relabels 'new' files to 'current'
current_to_old(): relabels 'current' files to 'old'
sequence of events:
bug descriptions:
possible fixes:
final resolution: