Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-7339

Watchlist documents property does not scale

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Similar issues:

      Description

      I was reported that trying to save a user document in object mode (to change the user from active to inactive) or trying to change the password caused the exception in the attached file.

      I inspected the user object for that user and found that the "documents" property of the watchlist object is pretty big, a wc on it reported 65532 characters. Knowing that the mysql limit of text fields is at 65535 (and the xwiki mapping limit is at 60000), I suspect the issue is caused by an overflow of this property.

      Note that I personally didn't manage to reproduce. There are still some issues that I don't understand, e.g. why would a modification throw an exception since that field id not modified, and its size is still under the limit. One sort of explanation that I find is that the user document was in the cache already with a higher value for that field and that save was trying to save the cached version of the document.

      This issue is to signal the fact that apparently there is no verification of this limit when operating with the documents list in the watchlist. I highlighted autowatch in the issue title since, for this user that I tested, the watched documents count is 965, which could be considered a bit too high to be added manually by the user, but can be easily reached with a user for which autowatch is enabled (also depending on the autowatch policy).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                enygma Eduard Moraru
                Reporter:
                lucaa Anca Luca
              • Votes:
                5 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: