What triggers an edited file to get updated?

There seems to be something strange that I don’t understand about how OO or Documentserver_community decides to write changes back to the file during or after editing.

Can anyone explain what triggers a file update? Changes get written (encoded) in the database during editing. Another database table keeps track of which users are currently editing (or viewing) files.

The session entry in the db doesn’t get cleared immediately when the user closes the file, it seems to happen some time later - sometimes up to a couple of hours later, sometimes within a minute or so, sometimes when someone else opens the same file, sometimes not.

Even when the last session entry for a file is cleared the changes don’t necessarily get written back to the file.

On occasion I have seen the sess entry not being cleared for a day (or possibly even days) and the changes not updated in the file, meaning that anyone downloading the file in the meantime gets an out of date copy.

Can anyone explain what is “supposed” to happen, and what, if any, settings might affect this.

Then can anyone explain what might be going wrong?

Using OO-connector 4.1.4 and Community Document Server 0.1.5 on NC 18.0.1 but the same seems to happen with OO