Commit 9a7456e6 authored by Maged Michael's avatar Maged Michael Committed by Facebook Github Bot

ConcurrentHashMap: Temporarily disable using hazptr_obj_batch for bucket arrays.

Summary:
Completes the previous change to disable destruction order guarantee for keys and values to give some higher-level users of ConcurrentHashMap time to adapt to the destruction order guarantee.
To reenable the destruction order guarantee, uncomment the two calls to set_batch_tag that were commented out in this and the previous change.

Reviewed By: davidtgoldblatt

Differential Revision: D13141742

fbshipit-source-id: c49ad5b0a0f82da7b36e0fea294425ec2b681ab9
parent b9e1c0ca
......@@ -673,7 +673,8 @@ class alignas(64) ConcurrentHashMapSegment {
auto buf =
Allocator().allocate(sizeof(Buckets) + sizeof(BucketRoot) * count);
auto buckets = new (buf) Buckets();
buckets->set_batch_tag(batch); // defined in hazptr_obj
DCHECK(batch);
// buckets->set_batch_tag(batch); // defined in hazptr_obj
for (size_t i = 0; i < count; i++) {
new (&buckets->buckets_[i]) BucketRoot;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment