Xwiki, Locking and Overwritten Changes

Using Xwiki 10.11.3, we just had an issue of “data loss” where edits from one user silently overwrote another user’s edits.

We assume that this was due to

https://jira.xwiki.org/browse/XWIKI-6665

Are there any plans to backport this fix (apparently included in Xwiki 11.2rc, according to this issue’s meta data) to 10.11 LTS?

In general, could it be an idea for Xwiki to refresh an existing lock from time to time if an edit session really is active for more than 30 minutes (which may easily happen if someone is writing longer texts)?

Would it be ok if I open a feature wishlist issue for that, or should it already work this way? Or is it difficult / impossible to determine if a user is simply working for that long, compared to crashed client or a client which lost internet connection? (It would probably need some javascript, but in our case both sessions used the CK Editor, which already uses tons of it… Maybe there could be some kind of CKE plugin to do so?)

Just note that nothing is lost since it’s in the revision history and you can diff it and put it back :slight_smile:

No plans FTM, it required several changes to implement and it’s potentially bit dangerous to move to the 10.11.x LTS. We recommend upgrading to 11.2 instead.

How do you know that an edit session is active? One reason we implemented XWIKI-6665 is because we had users who opened a browser tab, editing a page in it, and left it till the next day, and then made some changes and clicked save.

AFAIK, right now the session is the Servlet engine session, which is by default 30 minutes. You can easily increase this session duration to more if you wish.

Yes, sorry, that’s why I placed quotation marks around “data loss”, and I also wanted to explicitly point out that we pulled all stuff out of the history, but forgot to do so while writing my reply…

Still it’s dangerous if it’s not noticed that some updates had been overwritten. Then technically everything is still there, but practically, for all intents and purposes, it’s “lost” until someone rediscovers the missing information more or less by accident…

Ok, I understand.

I’m not feeling too adventurous at the moment and planned to stick to LTS… So that’s somewhat unfortunate for me, but that’s the way it is…

The editor could periodically ping the server, say about once every 15 minutes or so. Or it could only ping the server if the user actually performs some actions and the last ping is more than say 15 minutes ago.

Then the server could either re-establish the lock, if possible, or immediately send a warning to the user that a different user aquired the lock in the meantime.

In this case, the “I keep my edit session over night” user from your scenario would even get a warning as soon as (s)he tries to continue editing after waking up…

Yes, that’s the workaround I planned to use for now without the fix in 10.11. However it also does not protect against overwritten data in the scenario you mentioned.

Anyway, thanks for the quick reply, as usual! I just applied for a support contract at XWiki SAS to support further development somewhat. :slight_smile:

Awesome, thanks for supporting the development of the XWiki software! :wink: