Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6878fad
foundation
Niroshan2001 Oct 14, 2025
196d246
actually use the DynamicThreadPool via IntraPartitionParallelExecutor
Niroshan2001 Oct 28, 2025
4fee3c3
Refactor NodeManager and OperatorExecutor for improved parallel proce…
Niroshan2001 Nov 26, 2025
6477a3d
Merge branch 'master' of https://github.com/Niroshan2001/jasminegraph…
Dec 4, 2025
ba6b068
minor changes
Niroshan2001 Dec 4, 2025
2df6d7b
fix style issue
Niroshan2001 Dec 4, 2025
e269af0
replace lock_guard withscoped_lock
Niroshan2001 Dec 4, 2025
c4bb9da
fix style issue
Niroshan2001 Dec 4, 2025
09c933f
cleanup the codebase
Niroshan2001 Dec 4, 2025
9b4120e
Clean up any existing test resources before starting
Niroshan2001 Dec 6, 2025
e184815
fix style issue
Niroshan2001 Dec 6, 2025
e0c6356
Merge branch 'master' of github.com:Niroshan2001/jasminegraph into in…
Niroshan2001 Dec 10, 2025
cdcba2f
address sonarcloud issues
Niroshan2001 Dec 10, 2025
d8f7448
fix build issue
Niroshan2001 Dec 10, 2025
7023068
fix SonarCloud Code Analysis
Niroshan2001 Dec 10, 2025
e7dce52
fix some issues
Niroshan2001 Dec 10, 2025
2e44a46
fix some SonarCloud Code Analysis
Niroshan2001 Dec 10, 2025
0b83046
fixsome errors
Niroshan2001 Dec 10, 2025
517efec
minor changes
Niroshan2001 Dec 10, 2025
1aecf03
fix somewarnings
Niroshan2001 Dec 10, 2025
f40d04f
fix somewarnings
Niroshan2001 Dec 10, 2025
438777f
fix Rewrite the code so that you no longer need this "delete".
Niroshan2001 Dec 11, 2025
95454a7
fix Refactor this function to reduce its Cognitive Complexity from 30…
Niroshan2001 Dec 11, 2025
a20c42c
fix Catch a more specific exception instead of a generic one.
Niroshan2001 Dec 11, 2025
3713307
improve code quality
Niroshan2001 Dec 11, 2025
156a3df
fix somesonarcloud issues
Niroshan2001 Dec 11, 2025
1b55d0e
Replaced RAII cleanup vectors with immediate delete[] after string co…
Niroshan2001 Dec 11, 2025
4a4ef45
fix some sonarcloud issues
Niroshan2001 Dec 11, 2025
9d9efce
some fixes
Niroshan2001 Dec 11, 2025
dc853f1
minor fixes
Niroshan2001 Dec 11, 2025
02aa6f2
minor changes
Niroshan2001 Dec 11, 2025
4af4bd9
fix style issue
Niroshan2001 Dec 11, 2025
3728624
fix style
Niroshan2001 Dec 11, 2025
b611241
Merge branch 'master' of github.com:Niroshan2001/jasminegraph into in…
Niroshan2001 Dec 14, 2025
3f86552
Merge branch 'master' of github.com:Niroshan2001/jasminegraph into in…
Niroshan2001 Dec 18, 2025
56677f2
minor fix
Niroshan2001 Dec 18, 2025
d41e19e
add worker count to configurartionsection
Niroshan2001 Dec 19, 2025
40e3780
change predicate
Niroshan2001 Dec 19, 2025
b47d233
fix style
Niroshan2001 Dec 19, 2025
7bdf6ec
made the timeout behavior explicit in the docs
Niroshan2001 Dec 19, 2025
99198b4
add dynamic threshold
Niroshan2001 Dec 19, 2025
c87b632
update integration test
Niroshan2001 Dec 21, 2025
6507dd4
fix style
Niroshan2001 Dec 21, 2025
ab866e9
update unit test
Niroshan2001 Dec 21, 2025
6dae29c
fix style issue
Niroshan2001 Dec 21, 2025
ad070e5
minor change
Niroshan2001 Dec 21, 2025
50bc8d5
update unittest
Niroshan2001 Dec 21, 2025
ea25d4e
fix style issue
Niroshan2001 Dec 22, 2025
138723c
fix style issue
Niroshan2001 Dec 22, 2025
80b9c48
replace 2025 with 2026
Jan 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ set(SOURCES src/backend/JasmineGraphBackend.cpp
src/query/processor/cypher/runtime/InstanceHandler.cpp
src/query/processor/cypher/runtime/OperatorExecutor.cpp
src/query/processor/cypher/util/SharedBuffer.cpp
src/query/processor/executor/IntraPartitionParallelExecutor.cpp
src/nativestore/MetaPropertyLink.cpp
src/nativestore/MetaPropertyEdgeLink.cpp
src/nativestore/MetaPropertyLink.cpp
Expand Down
7 changes: 7 additions & 0 deletions conf/jasminegraph-server.properties
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,12 @@ org.jasminegraph.vectorstore.dimension=768
org.jasminegraph.vectorstore.embedding.model=nomic-embed-text
org.jasminegraph.vectorstore.embedding.ollama.endpoint=http://172.30.5.100:11441

#--------------------------------------------------------------------------------
# Query execution thread pool settings
#--------------------------------------------------------------------------------
#Maximum number of worker threads for intra-partition parallel query execution
#If not set, defaults to 32.
org.jasminegraph.query.threadpool.maxworkers=32



13 changes: 5 additions & 8 deletions src/nativestore/NodeBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,11 @@ std::list<std::pair<NodeBlock*, RelationBlock*>> NodeBlock::getAllEdgeNodes() {
return allEdges;
}

std::map<std::string, char*> NodeBlock::getAllProperties() {
std::map<std::string, char*> allProperties;
std::map<std::string, std::string, std::less<>> NodeBlock::getAllProperties() {
std::map<std::string, std::string, std::less<>> allProperties;
PropertyLink* current = this->getPropertyHead();
while (current) {
// don't forget to free the allocated memory after using this method
char* copiedValue = new char[PropertyLink::MAX_VALUE_SIZE];
std::strncpy(copiedValue, current->value, PropertyLink::MAX_VALUE_SIZE);
allProperties.insert({current->name, copiedValue});
allProperties.try_emplace(current->name, current->value);
PropertyLink* temp = current->next();
delete current; // To prevent memory leaks
current = temp;
Expand Down Expand Up @@ -486,8 +483,8 @@ NodeBlock* NodeBlock::get(unsigned int blockAddress) {
new NodeBlock(id, nodeId, blockAddress, propRef, metaPropRef, edgeRef,
centralEdgeRef, edgeRefPID, label, usage);
if (nodeBlockPointer->id.length() == 0) { // if label not found in node block look in the properties
std::map<std::string, char*> props = nodeBlockPointer->getAllProperties();
if (props["label"]) {
std::map<std::string, std::string, std::less<>> props = nodeBlockPointer->getAllProperties();
if (!props["label"].empty()) {
nodeBlockPointer->id = props["label"];
} else {
node_block_logger.error("Could not find node ID/Label for node with block address = " +
Expand Down
2 changes: 1 addition & 1 deletion src/nativestore/NodeBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class NodeBlock {
std::map<std::string, char *> getProperty(std::string);
PropertyLink *getPropertyHead();
MetaPropertyLink *getMetaPropertyHead();
std::map<std::string, char *> getAllProperties();
std::map<std::string, std::string, std::less<>> getAllProperties();

bool updateLocalRelation(RelationBlock *, bool relocateHead = true);
bool updateCentralRelation(RelationBlock *newRelation, bool relocateHead = true);
Expand Down
12 changes: 8 additions & 4 deletions src/nativestore/NodeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,16 @@ int NodeManager::dbSize(std::string path) {
* @Deprecated use NodeBlock.get() instead
**/
NodeBlock *NodeManager::get(std::string nodeId) {
NodeBlock *nodeBlockPointer = NULL;
NodeBlock *nodeBlockPointer = nullptr;
if (this->nodeIndex.find(nodeId) == this->nodeIndex.end()) { // Not found
return nodeBlockPointer;
}
unsigned int nodeIndex = this->nodeIndex[nodeId];
return get(nodeIndex, nodeId);
}

NodeBlock *NodeManager::get(unsigned int nodeIndex, const std::string& nodeId) {
NodeBlock *nodeBlockPointer = nullptr;
const unsigned int blockAddress = nodeIndex * NodeBlock::BLOCK_SIZE;
NodeBlock::nodesDB->seekg(blockAddress);
unsigned int vertexId;
Expand Down Expand Up @@ -455,11 +460,10 @@ NodeBlock *NodeManager::get(std::string nodeId) {
nodeBlockPointer = new NodeBlock(nodeId, vertexId, blockAddress, propRef, metaPropRef, edgeRef,
centralEdgeRef, edgeRefPID, label, usage);

node_manager_logger.debug("DEBUG: nodeBlockPointer after creating the object edgeRef " +
std::to_string(nodeBlockPointer->edgeRef));

if (nodeBlockPointer->edgeRef % RelationBlock::BLOCK_SIZE != 0) {
node_manager_logger.error("Exception: Invalid edge reference address = " + nodeBlockPointer->edgeRef);
node_manager_logger.error("Exception: Invalid edge reference address = " +
std::to_string(nodeBlockPointer->edgeRef));
}
return nodeBlockPointer;
}
Expand Down
6 changes: 4 additions & 2 deletions src/nativestore/NodeManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ class NodeManager {
std::unordered_map<std::string, unsigned int> nodeIndex;
std::unordered_map<std::string, unsigned int> edgeIndex;
NodeManager(GraphConfig);
~NodeManager() { delete NodeBlock::nodesDB; };

NodeBlock *get(std::string);
static NodeBlock *get(unsigned int nodeIndex, const std::string& nodeId);
void addNode(NodeBlock nodeBlock);

void setIndexKeySize(unsigned long);
static int dbSize(std::string path);
Expand All @@ -72,7 +75,6 @@ class NodeManager {
RelationBlock* addCentralRelation(NodeBlock source, NodeBlock destination);

NodeBlock* addNode(std::string); // will return DB block address
NodeBlock* get(std::string);

std::list<NodeBlock*> getCentralGraph();
std::list<NodeBlock> getLimitedGraph(int limit = 10);
Expand Down
9 changes: 3 additions & 6 deletions src/nativestore/RelationBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,14 +849,11 @@ MetaPropertyEdgeLink *RelationBlock::getMetaPropertyHead() {
return MetaPropertyEdgeLink::get(this->metaPropertyAddress);
}

std::map<std::string, char*> RelationBlock::getAllProperties() {
std::map<std::string, char*> allProperties;
std::map<std::string, std::string, std::less<>> RelationBlock::getAllProperties() {
std::map<std::string, std::string, std::less<>> allProperties;
PropertyEdgeLink* current = this->getPropertyHead();
while (current) {
// don't forget to free the allocated memory after using this method
char* copiedValue = new char[PropertyEdgeLink::MAX_VALUE_SIZE];
std::strncpy(copiedValue, current->value, PropertyEdgeLink::MAX_VALUE_SIZE);
allProperties.insert({current->name, copiedValue});
allProperties.try_emplace(current->name, current->value);
PropertyEdgeLink* temp = current->next();
delete current; // To prevent memory leaks
current = temp;
Expand Down
2 changes: 1 addition & 1 deletion src/nativestore/RelationBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class RelationBlock {
std::string getCentralRelationshipType();
PropertyEdgeLink *getPropertyHead();
MetaPropertyEdgeLink *getMetaPropertyHead();
std::map<std::string, char *> getAllProperties();
std::map<std::string, std::string, std::less<>> getAllProperties();
};

#endif
Loading
Loading