https://bugs.freedesktop.org/show_bug.cgi?id=53473

--- Comment #4 from Fred Toussi <[email protected]> ---
I have spent some more time on the pattern of checkpoints. Also read the
original OOo bug report.

The purpose of the CHECKPOINT is valid for the current implementation of the
internal zip stream in order to save all data as soon as a chenge is made.
However, it should be possible to improve it and avoid excessive checkpoints
when no data has changed.

Also note that at the time of the bug report version 1.8.0.1 was used, which
has advanced to version 1.8.0.10. This probably has different sync and related
characteristics.

It seems at the moment two "tricks" are used in tandem as a consequence of the
OOo bug report.

When a table is opened directly by double clicking, SET WRITE_DELAY 0 and SET
WRITE_DELAY 60 are executed, even when no change is made to the data.

It also seems any read causes the checkpoint. It seems if a checkpoint does not
happen, the stream that reads from the .zip is not reset after a read and will
throw an exception.

It should be possible to fix the issue without too many alterations.

1. Ensure the read stream is reset after reads. For this, check the code and
see what is done with readonly databases and use the same method for all
databases.
2. Set the WRITE_DELAY=0 as a permanent setting
3. Whenever a FileDescriptor.sync() is issued on the write stream used for the
.log file, check if the stream length has gone up by a lot more than the length
of a "COMMIT" string and perform the checkpoint only in this case. A change
contains at least "DELETE FROM tablename WHERE x=n" (at least 20 characters).
The WIRTE_DELAY=0 ensures the sync is called only at a commit and not at other
times.

As mentioned on bug 53333 you can use a custom version 2.2.9 or 2.3.0 jar with
logging enabled in order to see which commands are sent to the database.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to