-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A retried request is processed outside of Tx when the commit failure object log entry
failed to commit
#72
Comments
I only simulated failed commits on the object log, thereby exposing this behavior. The result of processing the request out-of-transaction is that the Seaside request's state changes are non-persistent: the request answers correctly but the Seaside session state is lost, leading to strange behavior of the Seaside app. |
commit failure object log entry
failed to commit
@jbrichau, the code was written assuming that when the block started the system would be out of transaction if it was in manual transaction mode ... perhaps an error should be thrown there instead, because being in transaction is indicative of a deeper problem ... I wouldn't argue that your suggestion is not good, but it may mask some deeper errors ... like now ... I think that the problem must be that we expect Am I making sense? I think that all senders of of #doTransaction: need to check the return value and take appropriate action to restore the transaction state ... or better yet (yikes) another error if a commit failure does occur? Am I going off the deep end? |
@dalehenrich nope, I'm not falling off a cliff yet :) I agree it's better to make sure we do not re-enter the loop in transaction. But it's strange that when it would enter the loop already in a transaction, that it's aborting the transaction and not starting a new one (like now). Instead of throwing an error, I would also log an error and keep serving requests. So I'm thinking the fix should:
I'll get a pull request whipped up soon. |
Keep in mind that the
|
In the GRGemStonePlatform>>seasideProcessRequestWithRetry:resultBlock: method, when the addition of the 'commit failure' object log entry (see below) fails to commit, it leaves the process in Tx state.
When the request is retried (or when another waiting request enters the Tx-mutex protected block), the vm is in transaction. Next, the first statement of the Tx-block makes it leave transaction mode.
Because we are in manual transaction mode, I think this should be:
Though a failure to commit on the object is unlikely, is it impossible?
The text was updated successfully, but these errors were encountered: