Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 9c34fed

Browse files
mbutrovichtli2
authored andcommitted
Revert "Garbage collection fixes (#1428)" (#1462)
This reverts commit b693494 The combination of this PR and #1455 manifests a segfault in YCSB that we dont yet understand. Reverting in the meantime.
1 parent b693494 commit 9c34fed

19 files changed

+372
-1601
lines changed

src/common/container/cuckoo_map.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ class IndexMetric;
3232

3333
class StatementCache;
3434

35-
template <typename T>
36-
class LockFreeQueue;
37-
3835
CUCKOO_MAP_TEMPLATE_ARGUMENTS
3936
CUCKOO_MAP_TYPE::CuckooMap() {}
4037

@@ -128,8 +125,4 @@ template class CuckooMap<std::shared_ptr<oid_t>, std::shared_ptr<oid_t>>;
128125
// Used in StatementCacheManager
129126
template class CuckooMap<StatementCache *, StatementCache *>;
130127

131-
// Used in TransactionLevelGCManager
132-
template class CuckooMap<oid_t,
133-
std::shared_ptr<LockFreeQueue<ItemPointer>>>;
134-
135128
} // namespace peloton

src/common/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void PelotonInit::Initialize() {
5252
threadpool::MonoQueuePool::GetExecutionInstance().Startup();
5353

5454
int parallelism = (CONNECTION_THREAD_COUNT + 3) / 4;
55-
storage::DataTable::SetDefaultActiveTileGroupCount(parallelism);
55+
storage::DataTable::SetActiveTileGroupCount(parallelism);
5656
storage::DataTable::SetActiveIndirectionArrayCount(parallelism);
5757

5858
// start epoch.

src/common/internal_types.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,8 +3001,8 @@ std::string GCVersionTypeToString(GCVersionType type) {
30013001
case GCVersionType::ABORT_UPDATE: {
30023002
return "ABORT_UPDATE";
30033003
}
3004-
case GCVersionType::TOMBSTONE: {
3005-
return "TOMBSTONE";
3004+
case GCVersionType::ABORT_DELETE: {
3005+
return "ABORT_DELETE";
30063006
}
30073007
case GCVersionType::ABORT_INSERT: {
30083008
return "ABORT_INSERT";
@@ -3031,8 +3031,8 @@ GCVersionType StringToGCVersionType(const std::string &str) {
30313031
return GCVersionType::COMMIT_INS_DEL;
30323032
} else if (upper_str == "ABORT_UPDATE") {
30333033
return GCVersionType::ABORT_UPDATE;
3034-
} else if (upper_str == "TOMBSTONE") {
3035-
return GCVersionType::TOMBSTONE;
3034+
} else if (upper_str == "ABORT_DELETE") {
3035+
return GCVersionType::ABORT_DELETE;
30363036
} else if (upper_str == "ABORT_INSERT") {
30373037
return GCVersionType::ABORT_INSERT;
30383038
} else if (upper_str == "ABORT_INS_DEL") {

src/concurrency/timestamp_ordering_transaction_manager.cpp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -709,9 +709,6 @@ ResultType TimestampOrderingTransactionManager::CommitTransaction(
709709
gc_set->operator[](tile_group_id)[tuple_slot] =
710710
GCVersionType::COMMIT_DELETE;
711711

712-
gc_set->operator[](new_version.block)[new_version.offset] =
713-
GCVersionType::TOMBSTONE;
714-
715712
log_manager.LogDelete(ItemPointer(tile_group_id, tuple_slot));
716713

717714
} else if (tuple_entry.second == RWType::INSERT) {
@@ -830,11 +827,9 @@ ResultType TimestampOrderingTransactionManager::AbortTransaction(
830827
// before we unlink the aborted version from version list
831828
ItemPointer *index_entry_ptr =
832829
tile_group_header->GetIndirection(tuple_slot);
833-
if (index_entry_ptr) {
834-
UNUSED_ATTRIBUTE auto res = AtomicUpdateItemPointer(
835-
index_entry_ptr, ItemPointer(tile_group_id, tuple_slot));
836-
PELOTON_ASSERT(res == true);
837-
}
830+
UNUSED_ATTRIBUTE auto res = AtomicUpdateItemPointer(
831+
index_entry_ptr, ItemPointer(tile_group_id, tuple_slot));
832+
PELOTON_ASSERT(res == true);
838833
//////////////////////////////////////////////////
839834

840835
// we should set the version before releasing the lock.
@@ -880,11 +875,9 @@ ResultType TimestampOrderingTransactionManager::AbortTransaction(
880875
// before we unlink the aborted version from version list
881876
ItemPointer *index_entry_ptr =
882877
tile_group_header->GetIndirection(tuple_slot);
883-
if (index_entry_ptr) {
884-
UNUSED_ATTRIBUTE auto res = AtomicUpdateItemPointer(
885-
index_entry_ptr, ItemPointer(tile_group_id, tuple_slot));
886-
PELOTON_ASSERT(res == true);
887-
}
878+
UNUSED_ATTRIBUTE auto res = AtomicUpdateItemPointer(
879+
index_entry_ptr, ItemPointer(tile_group_id, tuple_slot));
880+
PELOTON_ASSERT(res == true);
888881
//////////////////////////////////////////////////
889882

890883
// we should set the version before releasing the lock.
@@ -902,7 +895,7 @@ ResultType TimestampOrderingTransactionManager::AbortTransaction(
902895

903896
// add the version to gc set.
904897
gc_set->operator[](new_version.block)[new_version.offset] =
905-
GCVersionType::TOMBSTONE;
898+
GCVersionType::ABORT_DELETE;
906899

907900
} else if (tuple_entry.second == RWType::INSERT) {
908901
tile_group_header->SetBeginCommitId(tuple_slot, MAX_CID);

0 commit comments

Comments
 (0)