Skip to content

Commit

Permalink
Change log messages and remove unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thamindumk committed Feb 11, 2025
1 parent 2ab6624 commit bb9b51b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/nativestore/MetaPropertyEdgeLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ unsigned int MetaPropertyEdgeLink::insert(std::string name, char* value) {
this->metaEdgePropertiesDB->write(reinterpret_cast<char*>(dataValue), MetaPropertyEdgeLink::MAX_VALUE_SIZE);
this->metaEdgePropertiesDB->flush();
pthread_mutex_unlock(&lockInsertMetaPropertyEdgeLink);

Check warning on line 76 in src/nativestore/MetaPropertyEdgeLink.cpp

View check run for this annotation

Codecov / codecov/patch

src/nativestore/MetaPropertyEdgeLink.cpp#L76

Added line #L76 was not covered by tests
property_edge_link_logger.debug("updating already existing property key = " + std::string(name));
property_edge_link_logger.debug("Updating already existing property key = " + std::string(name));
return this->blockAddress;

Check warning on line 78 in src/nativestore/MetaPropertyEdgeLink.cpp

View check run for this annotation

Codecov / codecov/patch

src/nativestore/MetaPropertyEdgeLink.cpp#L78

Added line #L78 was not covered by tests
} else if (this->nextPropAddress) { // Traverse to the edge/end of the link list
std::unique_ptr<MetaPropertyEdgeLink> pel(new MetaPropertyEdgeLink(this->nextPropAddress));
Expand Down
2 changes: 1 addition & 1 deletion src/nativestore/MetaPropertyLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ unsigned int MetaPropertyLink::insert(std::string name, const char* value) {
this->metaPropertiesDB->write(reinterpret_cast<char*>(dataValue), MetaPropertyLink::MAX_VALUE_SIZE);
this->metaPropertiesDB->flush();
pthread_mutex_unlock(&lockInsertMetaPropertyLink);

Check warning on line 73 in src/nativestore/MetaPropertyLink.cpp

View check run for this annotation

Codecov / codecov/patch

src/nativestore/MetaPropertyLink.cpp#L73

Added line #L73 was not covered by tests
meta_property_link_logger.debug("updating already existing property key = " + std::string(name));
meta_property_link_logger.debug("Updating already existing property key = " + std::string(name));
return this->blockAddress;

Check warning on line 75 in src/nativestore/MetaPropertyLink.cpp

View check run for this annotation

Codecov / codecov/patch

src/nativestore/MetaPropertyLink.cpp#L75

Added line #L75 was not covered by tests
} else if (this->nextPropAddress) { // Traverse to the edge/end of the link list
return this->next()->insert(name, value);
Expand Down
6 changes: 2 additions & 4 deletions src/nativestore/NodeBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,10 @@ void NodeBlock::addProperty(std::string name, const char* value) {
void NodeBlock::addMetaProperty(std::string name, const char* value) {

Check warning on line 98 in src/nativestore/NodeBlock.cpp

View check run for this annotation

Codecov / codecov/patch

src/nativestore/NodeBlock.cpp#L98

Added line #L98 was not covered by tests
if (this->metaPropRef == 0) {
MetaPropertyLink* newLink = MetaPropertyLink::create(name, value);
// pthread_mutex_lock(&lockAddNodeProperty);

if (newLink) {
this->metaPropRef = newLink->blockAddress;

Check warning on line 103 in src/nativestore/NodeBlock.cpp

View check run for this annotation

Codecov / codecov/patch

src/nativestore/NodeBlock.cpp#L103

Added line #L103 was not covered by tests
// If it was an empty prop link before inserting, Then update the property reference of this node
// block
// node_block_logger.info("propRef = " + std::to_string(this->propRef));

NodeBlock::nodesDB->seekp(this->addr +sizeof(this->usage) +sizeof(this->nodeId) + sizeof(this->edgeRef) +
sizeof(this->centralEdgeRef) + sizeof(this->edgeRefPID)+ sizeof(this->propRef));
NodeBlock::nodesDB->write(reinterpret_cast<char*>(&(this->metaPropRef)), sizeof(this->metaPropRef));
Expand Down

0 comments on commit bb9b51b

Please sign in to comment.