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

Commit d196acd

Browse files
authored
Merge branch 'master' into cost_model_txn_fix
2 parents 794a081 + 4b1e90a commit d196acd

File tree

8 files changed

+347
-309
lines changed

8 files changed

+347
-309
lines changed

Jenkinsfile

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -141,35 +141,35 @@ pipeline {
141141
// }
142142
// }
143143

144-
stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Debug)') {
145-
agent { docker { image 'fedora:27' } }
146-
steps {
147-
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
148-
sh 'python ./script/validators/source_validator.py'
149-
sh 'mkdir build'
150-
sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
151-
sh 'cd build && make check -j4'
152-
sh 'cd build && make install'
153-
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
154-
sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
155-
sh 'cd build && python ../script/validators/jdbc_validator.py'
156-
}
157-
}
144+
// stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Debug)') {
145+
// agent { docker { image 'fedora:27' } }
146+
// steps {
147+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
148+
// sh 'python ./script/validators/source_validator.py'
149+
// sh 'mkdir build'
150+
// sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
151+
// sh 'cd build && make check -j4'
152+
// sh 'cd build && make install'
153+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
154+
// sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
155+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
156+
// }
157+
// }
158158

159-
stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Release)') {
160-
agent { docker { image 'fedora:27' } }
161-
steps {
162-
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
163-
sh 'python ./script/validators/source_validator.py'
164-
sh 'mkdir build'
165-
sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
166-
sh 'cd build && make check -j4'
167-
sh 'cd build && make install'
168-
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
169-
sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
170-
sh 'cd build && python ../script/validators/jdbc_validator.py'
171-
}
172-
}
159+
// stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Release)') {
160+
// agent { docker { image 'fedora:27' } }
161+
// steps {
162+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
163+
// sh 'python ./script/validators/source_validator.py'
164+
// sh 'mkdir build'
165+
// sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
166+
// sh 'cd build && make check -j4'
167+
// sh 'cd build && make install'
168+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
169+
// sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
170+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
171+
// }
172+
// }
173173

174174
// stage('CentOS 7/gcc-4.8.5/llvm-3.9.1 (Debug)') {
175175
// agent { docker { image 'centos:7' } }

src/common/container/cuckoo_map.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include "common/container/cuckoo_map.h"
1717
#include "common/internal_types.h"
18+
#include "common/item_pointer.h"
1819
#include "common/logger.h"
1920
#include "common/macros.h"
2021

@@ -34,6 +35,9 @@ class StatementCache;
3435
CUCKOO_MAP_TEMPLATE_ARGUMENTS
3536
CUCKOO_MAP_TYPE::CuckooMap() {}
3637

38+
CUCKOO_MAP_TEMPLATE_ARGUMENTS
39+
CUCKOO_MAP_TYPE::CuckooMap(size_t initial_size) : cuckoo_map(initial_size) {}
40+
3741
CUCKOO_MAP_TEMPLATE_ARGUMENTS
3842
CUCKOO_MAP_TYPE::~CuckooMap() {}
3943

@@ -83,6 +87,18 @@ CUCKOO_MAP_TEMPLATE_ARGUMENTS
8387
CUCKOO_MAP_ITERATOR_TYPE
8488
CUCKOO_MAP_TYPE::GetIterator() { return cuckoo_map.lock_table(); }
8589

90+
CUCKOO_MAP_TEMPLATE_ARGUMENTS
91+
CUCKOO_MAP_ITERATOR_TYPE
92+
CUCKOO_MAP_TYPE::GetConstIterator() const {
93+
// WARNING: This is a compiler hack and should never be used elsewhere
94+
// If you are considering using this, please ask Marcel first
95+
// We need the const iterator on the const object and the cuckoohash
96+
// library returns a lock_table object. The other option would be to
97+
// Modify the cuckoohash library which is not neat.
98+
auto locked_table = const_cast<CuckooMap *>(this)->cuckoo_map.lock_table();
99+
return locked_table;
100+
}
101+
86102
// Explicit template instantiation
87103
template class CuckooMap<uint32_t, uint32_t>;
88104

@@ -102,4 +118,8 @@ template class CuckooMap<std::shared_ptr<oid_t>, std::shared_ptr<oid_t>>;
102118
// Used in StatementCacheManager
103119
template class CuckooMap<StatementCache *, StatementCache *>;
104120

121+
// Used in InternalTypes
122+
template class CuckooMap<ItemPointer, RWType, ItemPointerHasher,
123+
ItemPointerComparator>;
124+
105125
} // namespace peloton

0 commit comments

Comments
 (0)