Premature garbage collection screws up update process

Issue #24 resolved
Former user created an issue

It seems like the garbage collection based exchange cleaner prematurely removes files from the exchange that are a part of a model being updated. This shouldnt happen, as the GC should only see the files as not useful once the update has finished. As this depends on the quartz job running the GC process, this is a sporadic occurrence, and doesnt always occur. See log attached for an example.

Comments (2)

  1. Raza Ali

    It seems like the error has to do with the fact that references to the previous revision reside in flow memory. Webflows serialise all objects between state transitions (which is why they require all domain objects/services/etc involved to be serialisable). This seems (my theory) to fool the garbage collector into thinking the reference is no longer in use, and the revision is added to the reference queue used to delete files.

    This error can be reliably recreated by setting the GC job to a small repeat interval. If the same reference is put in session memory or the controller's memory, the revision is no longer cleaned from the exchange. Seems like a hacky solution, but I think the way forward is to put the reference to the update-in-process model in session memory and remove it when the update is completed (book keeping it would be nice to avoid if possible)

  2. Raza Ali

    Resolved by maintaining revision in session memory for the duration of the update process. Error doesnt appear despite letting the GC job run during the update process and files are removed once the update process is ended (either aborted or completed)

  3. Log in to comment