Skip to content

Commit

Permalink
#1668: Move setPhase method call
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Oct 18, 2023
1 parent 52ea161 commit 2b39b4a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/vt/vrt/collection/manager.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1181,8 +1181,6 @@ bool CollectionManager::insertCollectionElement(
elm_holder->insert(idx, typename Holder<IndexT>::InnerHolder{
std::move(vc)
});
auto raw_ptr = elm_holder->lookup(idx).getRawPtr();
raw_ptr->getLBData().setPhase(thePhase()->getCurrentPhase());

if (is_migrated_in) {
theLocMan()->getCollectionLM<IndexT>(proxy)->entityImmigrated(
Expand All @@ -1193,6 +1191,9 @@ bool CollectionManager::insertCollectionElement(
listener::ElementEventEnum::ElementMigratedIn, idx, home_node
);
} else {
auto raw_ptr = elm_holder->lookup(idx).getRawPtr();
raw_ptr->getLBData().setPhase(thePhase()->getCurrentPhase());

theLocMan()->getCollectionLM<IndexT>(proxy)->registerEntity(
idx, home_node,
CollectionManager::collectionMsgHandler<ColT, IndexT>
Expand Down Expand Up @@ -1683,10 +1684,6 @@ void CollectionManager::insert(
if (insert_node == this_node and proceed_with_insertion) {
auto cons_fn = detail::InsertMsgDispatcher<MsgT, ColT>::makeCons(insert_msg);
makeCollectionElement<ColT>(untyped_proxy, idx, mapped_node, cons_fn);

auto elm_holder = findElmHolder<IndexType>(untyped_proxy);
auto raw_ptr = elm_holder->lookup(idx).getRawPtr();
raw_ptr->getLBData().updatePhase(thePhase()->getCurrentPhase());
} else if (insert_node != this_node) {
auto msg = makeMessage<InsertMsg<ColT, MsgT>>(
proxy, idx, insert_node, mapped_node, modify_epoch, insert_msg
Expand Down

0 comments on commit 2b39b4a

Please sign in to comment.