Uploaded image for project: 'Poulpe'
  1. Poulpe
  2. POULPE-413

The system incorrectly handles cases when the several users perform editing/deleting the same items.

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 0.20 Swallows
    • Fix Version/s: backlog
    • Labels:
      None

      Description

      Precondition:

      • two users has been created; User1 is loggen in in Browser1 and User2 in Browser2;
      • some section has been created
      • both users open the page with forum structure

      Steps:

      1. User1 delete section
      2. User2 delete section

      As a result, error message about JCommune notification appears

      Note that this section will not disappear until you clik F5; if you just opening other pages like Users forum structure page will not be refreshed.

      Expected, that page will be refreshed after going to other pages

      Note the same issue can be reproduced when one user tries to remove a branch/component/(or create new branch in the deleted section/create several components/create section/branch in the deleted component, so on), which was already deleted the other user.

      Exceptions appears in somecases like

      on editing branches/section for ex:

      Could not execute JDBC batch update; SQL [/* create one-to-many row org.jtalks.common.model.entity.Section.branches */ update BRANCHES set SECTION_ID=?, POSITION=? where BRANCH_ID=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update[SQL: 1452, 23000]

      on deleting component

      Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

        Attachments

        1. section_delete.png
          25 kB
          Julia Atlygina
        2. section_detetion.swf
          591 kB
          Julia Atlygina

          Issue Links

            Activity

            Hide
            ctapobep Stanislav Bashkyrtsev added a comment -

            Because this will result in UI problems - this will be visible to the user. You probably should handle StaleObjectException in the DAO, rethrow it as some checked exception and somewhere on top near UI layer we need to show warning and reload the page.
            There should be some investigation carried out. For instance we need to figure out how to handle such errors globally if it's possible. Or how to show a dialog and after pressing Okay reload the page.

            Show
            ctapobep Stanislav Bashkyrtsev added a comment - Because this will result in UI problems - this will be visible to the user. You probably should handle StaleObjectException in the DAO, rethrow it as some checked exception and somewhere on top near UI layer we need to show warning and reload the page. There should be some investigation carried out. For instance we need to figure out how to handle such errors globally if it's possible. Or how to show a dialog and after pressing Okay reload the page.
            Hide
            ctapobep Stanislav Bashkyrtsev added a comment -

            Maybe let's think about different way.. We can implement that if we get an error, we show in on the screen and after pressing Ok, the page is refreshed and we're showing the last visited page.
            This would depend on other stories, like remembering ans opening last visited page and also showing an error dialog that can refresh the whole page.

            Show
            ctapobep Stanislav Bashkyrtsev added a comment - Maybe let's think about different way.. We can implement that if we get an error, we show in on the screen and after pressing Ok, the page is refreshed and we're showing the last visited page. This would depend on other stories, like remembering ans opening last visited page and also showing an error dialog that can refresh the whole page.
            Hide
            julik Julia Atlygina added a comment -

            Actually I've expected something like Stanistav described in comment above: error message appears and page is refreshed after clickin OK. Is it possible?

            Show
            julik Julia Atlygina added a comment - Actually I've expected something like Stanistav described in comment above: error message appears and page is refreshed after clickin OK. Is it possible?
            Hide
            polarhare Nickolay Polyarniy added a comment -

            I am trying to implement this. But on step "refresh page" there are many ways. I see only two: open forum structure window(but I think there may be old structure), and refresh whole page(but in this case user will must to click on components, on components, than on forum, and only than he will see updated structure)

            Show
            polarhare Nickolay Polyarniy added a comment - I am trying to implement this. But on step "refresh page" there are many ways. I see only two: open forum structure window(but I think there may be old structure), and refresh whole page(but in this case user will must to click on components, on components, than on forum, and only than he will see updated structure)
            Hide
            ctapobep Stanislav Bashkyrtsev added a comment -

            Let's do it gradually. First of all we need a Dialog window that should refresh the page if unexpected errors appear. Nickolay Polyarniy, could you raise a separate JIRA for that? You might want to look at how to configure that window globally for errors in ZK, I bet there should be something for that in zk.xml.

            Show
            ctapobep Stanislav Bashkyrtsev added a comment - Let's do it gradually. First of all we need a Dialog window that should refresh the page if unexpected errors appear. Nickolay Polyarniy , could you raise a separate JIRA for that? You might want to look at how to configure that window globally for errors in ZK, I bet there should be something for that in zk.xml.

              People

              • Assignee:
                Unassigned
                Reporter:
                julik Julia Atlygina
              • Votes:
                0 Vote for this issue
                Watchers:
                Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2h Original Estimate - 2h
                  2h
                  Remaining:
                  Time Spent - 3h Remaining Estimate - 1h 40m
                  1h 40m
                  Logged:
                  Time Spent - 3h Remaining Estimate - 1h 40m
                  3h

                    Structure Helper Panel