Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 27, 2019. It is now read-only.
/pelotonPublic archive

Commite24ddaf

Browse files
committed
undo formatting changes
1 parent9b29a4c commite24ddaf

File tree

6 files changed

+158
-54
lines changed

6 files changed

+158
-54
lines changed

‎src/concurrency/timestamp_ordering_transaction_manager.cpp‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,10 @@ void TimestampOrderingTransactionManager::YieldOwnership(
148148
tile_group_header->SetTransactionId(tuple_id, INITIAL_TXN_ID);
149149
}
150150

151-
boolTimestampOrderingTransactionManager::PerformRead(
152-
TransactionContext *const current_txn,const ItemPointer &read_location,
153-
storage::TileGroupHeader *tile_group_header,bool acquire_ownership) {
151+
boolTimestampOrderingTransactionManager::PerformRead(TransactionContext *const current_txn,
152+
const ItemPointer &read_location,
153+
storage::TileGroupHeader *tile_group_header,
154+
bool acquire_ownership) {
154155
ItemPointer location = read_location;
155156

156157
//////////////////////////////////////////////////////////
@@ -346,8 +347,7 @@ void TimestampOrderingTransactionManager::PerformInsert(
346347
oid_t tuple_id = location.offset;
347348

348349
auto storage_manager =storage::StorageManager::GetInstance();
349-
auto tile_group_header =
350-
storage_manager->GetTileGroup(tile_group_id)->GetHeader();
350+
auto tile_group_header = storage_manager->GetTileGroup(tile_group_id)->GetHeader();
351351
auto transaction_id = current_txn->GetTransactionId();
352352

353353
// check MVCC info
@@ -391,8 +391,9 @@ void TimestampOrderingTransactionManager::PerformUpdate(
391391
// version.
392392
PELOTON_ASSERT(tile_group_header->GetTransactionId(old_location.offset) ==
393393
transaction_id);
394-
PELOTON_ASSERT(tile_group_header->GetPrevItemPointer(old_location.offset)
395-
.IsNull() ==true);
394+
PELOTON_ASSERT(
395+
tile_group_header->GetPrevItemPointer(old_location.offset).IsNull() ==
396+
true);
396397

397398
// check whether the new version is empty.
398399
PELOTON_ASSERT(new_tile_group_header->GetTransactionId(new_location.offset) ==
@@ -496,8 +497,9 @@ void TimestampOrderingTransactionManager::PerformDelete(
496497
PELOTON_ASSERT(tile_group_header->GetTransactionId(old_location.offset) ==
497498
transaction_id);
498499
// we must be deleting the latest version.
499-
PELOTON_ASSERT(tile_group_header->GetPrevItemPointer(old_location.offset)
500-
.IsNull() ==true);
500+
PELOTON_ASSERT(
501+
tile_group_header->GetPrevItemPointer(old_location.offset).IsNull() ==
502+
true);
501503

502504
// check whether the new version is empty.
503505
PELOTON_ASSERT(new_tile_group_header->GetTransactionId(new_location.offset) ==
@@ -552,8 +554,7 @@ void TimestampOrderingTransactionManager::PerformDelete(
552554
oid_t tuple_id = location.offset;
553555

554556
auto storage_manager =storage::StorageManager::GetInstance();
555-
auto tile_group_header =
556-
storage_manager->GetTileGroup(tile_group_id)->GetHeader();
557+
auto tile_group_header = storage_manager->GetTileGroup(tile_group_id)->GetHeader();
557558

558559
PELOTON_ASSERT(tile_group_header->GetTransactionId(tuple_id) ==
559560
current_txn->GetTransactionId());
@@ -595,8 +596,6 @@ ResultType TimestampOrderingTransactionManager::CommitTransaction(
595596
return ResultType::SUCCESS;
596597
}
597598

598-
auto &rw_set = current_txn->GetReadWriteSet();
599-
600599
auto storage_manager =storage::StorageManager::GetInstance();
601600
auto &log_manager =logging::LogManager::GetInstance();
602601

@@ -605,6 +604,7 @@ ResultType TimestampOrderingTransactionManager::CommitTransaction(
605604
// generate transaction id.
606605
cid_t end_commit_id = current_txn->GetCommitId();
607606

607+
auto &rw_set = current_txn->GetReadWriteSet();
608608
auto &rw_object_set = current_txn->GetCreateDropSet();
609609

610610
auto gc_set = current_txn->GetGCSetPtr();

‎src/concurrency/transaction_manager.cpp‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,8 @@ bool TransactionManager::IsOccupied(TransactionContext *const current_txn,
9999
constvoid *position_ptr) {
100100
ItemPointer &position = *((ItemPointer *)position_ptr);
101101

102-
auto tile_group_header =storage::StorageManager::GetInstance()
103-
->GetTileGroup(position.block)
104-
->GetHeader();
102+
auto tile_group_header =
103+
storage::StorageManager::GetInstance()->GetTileGroup(position.block)->GetHeader();
105104
auto tuple_id = position.offset;
106105

107106
txn_id_t tuple_txn_id = tile_group_header->GetTransactionId(tuple_id);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp