Apply TODOs
This commit is contained in:
parent
dc2acf15e2
commit
fd0f4a0346
@ -317,11 +317,9 @@ Result<EdgeAccessor> InMemoryStorage::InMemoryAccessor::CreateEdge(VertexAccesso
|
||||
guard_from.lock();
|
||||
}
|
||||
|
||||
// TODO short-circuit
|
||||
if (storage_->config_.salient.items.enable_edge_type_index_auto_creation) {
|
||||
if (!storage_->indices_.edge_type_index_->IndexExists(edge_type)) {
|
||||
storage_->edge_types_to_auto_index_->emplace(edge_type);
|
||||
}
|
||||
if (storage_->config_.salient.items.enable_edge_type_index_auto_creation &&
|
||||
!storage_->indices_.edge_type_index_->IndexExists(edge_type)) {
|
||||
storage_->edge_types_to_auto_index_->emplace(edge_type);
|
||||
}
|
||||
|
||||
if (!PrepareForWrite(&transaction_, from_vertex)) return Error::SERIALIZATION_ERROR;
|
||||
|
@ -118,11 +118,9 @@ Result<bool> VertexAccessor::AddLabel(LabelId label) {
|
||||
storage_->stored_node_labels_.try_insert(label);
|
||||
}
|
||||
|
||||
// TODO short-circuit
|
||||
if (storage_->config_.salient.items.enable_label_index_auto_creation) {
|
||||
if (!storage_->indices_.label_index_->IndexExists(label)) {
|
||||
storage_->labels_to_auto_index_->emplace(label);
|
||||
}
|
||||
if (storage_->config_.salient.items.enable_label_index_auto_creation &&
|
||||
!storage_->indices_.label_index_->IndexExists(label)) {
|
||||
storage_->labels_to_auto_index_->emplace(label);
|
||||
}
|
||||
|
||||
/// TODO: some by pointers, some by reference => not good, make it better
|
||||
|
Loading…
Reference in New Issue
Block a user