Details
Description
We are having an issue that is only affecting our live instance where
when you are in a Lessons page and select to add some new text to the
page you enter some words and click "Save", the item always gets added
to the page, but sometimes the text contents you entered are lost, so
you end up with an empty item in the page. We can't reproduce this on
dev or test machines although did see it on a staging machine when it
was running slowly. You can then edit the item and add the text and
this always correctly updates the item (can't get this to fail).
Looking at the code it seems the transaction boundary is on all the
calls between SimplePageBean and SimplePageToolDao so any call across
this boundary will get a new transaction and possibly a new hibernate
sessions. When a new item is added to the page there appear to be 3
calls across this boundary:
- The first one is a call to a saveItem() which adds the new row, but
it doesn't yet have all it's properties set. We know this must be
completing as we see this much in the DB. - The second one is a call to update() which is done when setting the
groups on the item. - The third one is another call to update() which is called at the end
which is redundant if there are groups.
In between the first and second calls the HTML description is set on
the object so that is hinting that everything after the first one
isn't working when we see a failure. My current guess is that on a
heavily loaded server we end up getting back a different
session/transaction after the first call and this is what causes it to
fail. Although from looking at the code any errors that result of
hibernate not managing to persist something should result in an error
showing up in the UI and we're not getting any in the UI or in the
logs.
Our hibernate sessions should be bound to threads but once the
transactions has been closed, I'm not sure if you will get the same
session back the next time.
Gliffy Diagrams
Zeplin
Attachments
Issue Links
- relates to
-
SAK-37869 Editing text creates a second copy of the text component
-
- CLOSED
-