Skip to content

A retried request is processed outside of Tx when the commit failure object log entry failed to commit #72

@jbrichau

Description

@jbrichau

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.

self 
    saveLogEntry: (WAObjectLogEntry warn: 'Commit failure - retrying' request: aNativeRequest url object: conflicts)  
    shouldCommit: true.

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.

        System inTransaction
            ifTrue:[ self doAbortTransaction. ]
            ifFalse: [ self doBeginTransaction ].

Because we are in manual transaction mode, I think this should be:

        System inTransaction
            ifTrue:[ self doAbortTransaction. self doBeginTransaction. ]
            ifFalse: [ self doBeginTransaction ].

Though a failure to commit on the object is unlikely, is it impossible?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions