Wicket
  1. Wicket
  2. WICKET-4572

DiskDataStore returns the wrong page when the page disk space is full

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.5.6
    • Fix Version/s: 1.5.7, 6.0.0-beta3
    • Component/s: wicket
    • Labels:
      None

      Description

      If the configured file size for the session data is overflowed (see org.apache.wicket.settings.IStoreSettings#setMaxSizePerSession(Bytes)) then Wicket may return wrong page data (bytes) for a expired page.

      The problem is in org.apache.wicket.pageStore.PageWindowManager#idToWindowIndex which may have several page ids (the keys) pointing to the same window index (values).

      1. pagecache.zip
        25 kB
        Martin Grigorov
      2. WICKET-4572.patch
        2 kB
        Martin Grigorov

        Activity

        Hide
        Martin Grigorov added a comment -

        A quickstart that reproduces the problem:

        1. Open the home page. There you can find two links ("Page A", "Page B")
        2. Now you have to open "Page B" in a new tab, three times in a row
        3. Switch to the Page B tab that you have opened first
        4. Click on the "update" link on that page
        5. You can now see that that an error occurred.

        Show
        Martin Grigorov added a comment - A quickstart that reproduces the problem: 1. Open the home page. There you can find two links ("Page A", "Page B") 2. Now you have to open "Page B" in a new tab, three times in a row 3. Switch to the Page B tab that you have opened first 4. Click on the "update" link on that page 5. You can now see that that an error occurred.
        Hide
        Martin Grigorov added a comment -

        Here is a patch that uses an inversed index to remove the obsolete/expired keys when adding a new page id.

        Show
        Martin Grigorov added a comment - Here is a patch that uses an inversed index to remove the obsolete/expired keys when adding a new page id.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Martin Grigorov
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development