mirror of https://gitee.com/bigwinds/arangodb
invalidate bucket data
This commit is contained in:
parent
c44649da00
commit
0fe0e89a89
|
@ -517,9 +517,18 @@ class AssocMulti {
|
|||
|
||||
try {
|
||||
for (size_t i = 0; i < _buckets.size(); ++i) {
|
||||
empty.emplace_back(new EntryType[static_cast<size_t>(_initialSize)]);
|
||||
auto newBucket = new EntryType[static_cast<size_t>(_initialSize)];
|
||||
for (IndexType j = 0; j < _initialSize; ++j) {
|
||||
newBucket[j].ptr = nullptr;
|
||||
newBucket[j].next = INVALID_INDEX;
|
||||
newBucket[j].prev = INVALID_INDEX;
|
||||
if (useHashCache) {
|
||||
newBucket[j].writeHashCache(0);
|
||||
}
|
||||
}
|
||||
empty.emplace_back(newBucket);
|
||||
}
|
||||
|
||||
|
||||
size_t i = 0;
|
||||
for (auto& b : _buckets) {
|
||||
invokeOnAllElements(callback, b);
|
||||
|
|
|
@ -334,9 +334,17 @@ class AssocUnique {
|
|||
std::vector<Element**> empty;
|
||||
empty.reserve(_buckets.size());
|
||||
|
||||
try {
|
||||
try {
|
||||
uint64_t const nrAlloc = initialSize();
|
||||
|
||||
for (size_t i = 0; i < _buckets.size(); ++i) {
|
||||
empty.emplace_back(new Element*[static_cast<size_t>(initialSize())]);
|
||||
auto newBucket = new Element*[static_cast<size_t>(nrAlloc)];
|
||||
|
||||
for (uint64_t j = 0; j < nrAlloc; ++j) {
|
||||
newBucket[j] = nullptr;
|
||||
}
|
||||
|
||||
empty.emplace_back(newBucket);
|
||||
}
|
||||
|
||||
size_t i = 0;
|
||||
|
|
Loading…
Reference in New Issue