Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Commit

Permalink
rename finished to finished_ in SessionTransactionContext
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfangAFW committed Dec 4, 2020
1 parent d895456 commit e21cf27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/k2/connector/yb/pggate/catalog/sql_catalog_entity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ ClusterInfo::~ClusterInfo() {

SessionTransactionContext::SessionTransactionContext(std::shared_ptr<K23SITxn> txn) {
txn_ = txn;
finished = false;
finished_ = false;
}

SessionTransactionContext::~SessionTransactionContext() {
if (!finished) {
if (!finished_) {
// abort the transaction if it has been committed or aborted
EndTransaction(false);
finished = true;
finished_ = true;
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/k2/connector/yb/pggate/catalog/sql_catalog_entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,19 @@ class SessionTransactionContext {

void Commit() {
EndTransaction(true);
finished = true;
finished_ = true;
}

void Abort() {
EndTransaction(false);
finished = true;
finished_ = true;
}

private:
void EndTransaction(bool should_commit);

std::shared_ptr<K23SITxn> txn_;
bool finished;
bool finished_;
};

// mapping to the status code defined in yb's status.h (some are not applicable and thus, not included here)
Expand Down

0 comments on commit e21cf27

Please sign in to comment.