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

Commit 9525e25

Browse files
Modified CreateDropSet to use tbb::concurrent_vector
1 parent 13ef502 commit 9525e25

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/include/common/internal_types.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <vector>
2525
#include <unistd.h>
2626

27+
#include "tbb/concurrent_vector.h"
28+
2729
#include "parser/pg_trigger.h"
2830
#include "type/type_id.h"
2931
#include "common/logger.h"
@@ -1224,7 +1226,7 @@ enum class DDLType {
12241226
CREATE,
12251227
DROP,
12261228
};
1227-
typedef std::vector<std::tuple<oid_t, oid_t, oid_t, DDLType>> CreateDropSet;
1229+
typedef tbb::concurrent_vector<std::tuple<oid_t, oid_t, oid_t, DDLType>> CreateDropSet;
12281230
typedef std::vector<std::tuple<oid_t, oid_t, oid_t>> GCObjectSet;
12291231

12301232
//===--------------------------------------------------------------------===//

src/include/concurrency/transaction_context.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ class TransactionContext : public Printable {
8989
}
9090

9191
void RecordCreate(oid_t database_oid, oid_t table_oid, oid_t index_oid) {
92-
rw_object_set_.emplace_back(database_oid, table_oid, index_oid,
93-
DDLType::CREATE);
92+
rw_object_set_.emplace_back(std::make_tuple(database_oid, table_oid,
93+
index_oid, DDLType::CREATE));
9494
}
9595

9696
void RecordDrop(oid_t database_oid, oid_t table_oid, oid_t index_oid) {
97-
rw_object_set_.emplace_back(database_oid, table_oid, index_oid,
98-
DDLType::DROP);
97+
rw_object_set_.emplace_back(std::make_tuple(database_oid, table_oid,
98+
index_oid, DDLType::DROP));
9999
}
100100

101101
void RecordRead(const ItemPointer &);

0 commit comments

Comments
 (0)