mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix apply table metadata updates
This commit is contained in:
@@ -404,7 +404,7 @@ ApplyStateTable::insert (ReadView const& base,
|
|||||||
case Action::cache:
|
case Action::cache:
|
||||||
LogicError("ApplyStateTable::insert: already cached");
|
LogicError("ApplyStateTable::insert: already cached");
|
||||||
case Action::insert:
|
case Action::insert:
|
||||||
LogicError("ApplyStateTable::insert: already inserted");
|
LogicError("ApplyStateTable::insert: already inserted");
|
||||||
case Action::modify:
|
case Action::modify:
|
||||||
LogicError("ApplyStateTable::insert: already modified");
|
LogicError("ApplyStateTable::insert: already modified");
|
||||||
case Action::erase:
|
case Action::erase:
|
||||||
@@ -504,7 +504,7 @@ ApplyStateTable::getForMod (ReadView const& base,
|
|||||||
auto iter = items_.find (key);
|
auto iter = items_.find (key);
|
||||||
if (iter != items_.end ())
|
if (iter != items_.end ())
|
||||||
{
|
{
|
||||||
auto const& item = iter->second;
|
auto& item = iter->second;
|
||||||
if (item.first == Action::erase)
|
if (item.first == Action::erase)
|
||||||
{
|
{
|
||||||
// VFALCO We need to think about throwing
|
// VFALCO We need to think about throwing
|
||||||
@@ -513,6 +513,9 @@ ApplyStateTable::getForMod (ReadView const& base,
|
|||||||
"Trying to thread to deleted node";
|
"Trying to thread to deleted node";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
// Track when a node gets modified only by metadata
|
||||||
|
if (item.first == Action::cache)
|
||||||
|
item.first = Action::modify;
|
||||||
return item.second;
|
return item.second;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user