Skip to content

Commit b498051

Browse files
committed
Factor this out: Fix deletion
1 parent b67cfaa commit b498051

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/IO/AbstractIOHandlerImpl.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,12 @@ std::future<void> AbstractIOHandlerImpl::flush()
235235
auto &parameter = deref_dynamic_cast<Parameter<O::DELETE_PATH>>(
236236
i.parameter.get());
237237
writeToStderr(
238-
"[", i.writable->parent, "->", i.writable, "] DELETE_PATH");
238+
"[",
239+
i.writable->parent,
240+
"->",
241+
i.writable,
242+
"] DELETE_PATH: ",
243+
parameter.path);
239244
deletePath(i.writable, parameter);
240245
break;
241246
}
@@ -248,7 +253,8 @@ std::future<void> AbstractIOHandlerImpl::flush()
248253
i.writable->parent,
249254
"->",
250255
i.writable,
251-
"] DELETE_DATASET");
256+
"] DELETE_DATASET: ",
257+
parameter.name);
252258
deleteDataset(i.writable, parameter);
253259
break;
254260
}

src/backend/BaseRecord.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -472,20 +472,14 @@ auto BaseRecord<T_elem>::erase(key_type const &key) -> size_type
472472
{
473473
bool const keyScalar = (key == RecordComponent::SCALAR);
474474
size_type res;
475-
if (!keyScalar || (keyScalar && this->at(key).constant()))
475+
if (!keyScalar)
476476
res = Container<T_elem>::erase(key);
477477
else
478478
{
479479
res = this->datasetDefined() ? 1 : 0;
480480
eraseScalar();
481481
}
482482

483-
if (keyScalar)
484-
{
485-
this->setWritten(false, Attributable::EnqueueAsynchronously::No);
486-
this->writable().abstractFilePosition.reset();
487-
this->get().m_datasetDefined = false;
488-
}
489483
return res;
490484
}
491485

0 commit comments

Comments
 (0)