Skip to content

Commit

Permalink
Remove @state.parent assignment on commit
Browse files Browse the repository at this point in the history
This piece of code was introduced on
67d8bb9 , which was calling
`committed?` in the `transaction_state` before calling the `committed!`
method. However on 7386ffc, the
`committed?` check was removed and replaced by a `finalized?`, which
only checks if the state is not nil. Thus we can remove that line.
  • Loading branch information
arthurnn committed Jul 29, 2014
1 parent aade0a0 commit dd9829a
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -72,7 +72,7 @@ def savepoint_name
end end


class TransactionState class TransactionState
attr_accessor :parent attr_reader :parent


VALID_STATES = Set.new([:committed, :rolledback, nil]) VALID_STATES = Set.new([:committed, :rolledback, nil])


Expand Down Expand Up @@ -245,7 +245,6 @@ def perform_rollback


def perform_commit def perform_commit
@state.set_state(:committed) @state.set_state(:committed)
@state.parent = parent.state
connection.release_savepoint(@savepoint_name) connection.release_savepoint(@savepoint_name)
end end
end end
Expand Down

0 comments on commit dd9829a

Please sign in to comment.