Skip to content

Commit

Permalink
Update redis and tokio version, and fix compatiblity issues
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyMatt committed Aug 15, 2024
1 parent 95fc2a1 commit eddc3ee
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # Must be manually set
token: ${{ secrets.CODECOV_TOKEN }}
files: codecov.json
fail_ci_if_error: true
services:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.vscode/
.vs/
/codecov.json
/dump.rdb
/dump.rdb
venv/
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ all-features = true

[dependencies]
parking_lot = { version = "0.12.3", default-features = false, features = ["deadlock_detection"] }
#redis = { version = "0.26.0", default-features = false, features = ["sentinel"] }
redis = { git = "https://github.com/EmilyMatt/redis-rs.git", branch = "main", default-features = false, features = ["sentinel"] }
regex = { version = "1.10.5", default-features = false, features = ["std", "perf", "unicode-bool", "unicode-perl"] }
redis = { version = "0.26.1", default-features = false, features = ["sentinel"] }
regex = { version = "1.10.6", default-features = false, features = ["std", "perf", "unicode-bool", "unicode-perl"] }
strum = { version = "0.26.3", default-features = false, features = ["std", "derive"] }
thiserror = "1.0.63"
tokio = { version = "1.39.2", default-features = false, features = ["macros", "sync", "rt-multi-thread"], optional = true }
Expand Down
1 change: 1 addition & 0 deletions resources/populate_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@
graph.query(f"CREATE {','.join(nodes_str + edges_str)}")

graph.create_node_fulltext_index("actor", "name")
graph.create_node_range_index("actor", "age")
9 changes: 6 additions & 3 deletions src/graph/asynchronous.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,13 @@ mod tests {
assert_eq!(indices.data.len(), 1);
assert_eq!(indices.data[0].entity_type, EntityType::Node);
assert_eq!(indices.data[0].index_label, "actor".to_string());
assert_eq!(indices.data[0].field_types.len(), 1);
assert_eq!(indices.data[0].field_types.len(), 2);
assert_eq!(
indices.data[0].field_types,
HashMap::from([("name".to_string(), vec![IndexType::Fulltext])])
HashMap::from([
("name".to_string(), vec![IndexType::Fulltext]),
("age".to_string(), vec![IndexType::Range])
])
);
}

Expand Down Expand Up @@ -584,7 +587,7 @@ mod tests {

assert_eq!(
execution_plan.string_representation(),
"\nResults\n Limit\n Aggregate\n Filter\n Node By Label Scan | (b:actor)\n Project\n Node By Label Scan | (a:actor)"
"\nResults\n Limit\n Aggregate\n Filter\n Node By Index Scan | (b:actor)\n Project\n Node By Label Scan | (a:actor)"
);
}

Expand Down
9 changes: 6 additions & 3 deletions src/graph/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,13 @@ mod tests {
assert_eq!(indices.data.len(), 1);
assert_eq!(indices.data[0].entity_type, EntityType::Node);
assert_eq!(indices.data[0].index_label, "actor".to_string());
assert_eq!(indices.data[0].field_types.len(), 1);
assert_eq!(indices.data[0].field_types.len(), 2);
assert_eq!(
indices.data[0].field_types,
HashMap::from([("name".to_string(), vec![IndexType::Fulltext])])
HashMap::from([
("name".to_string(), vec![IndexType::Fulltext]),
("age".to_string(), vec![IndexType::Range])
])
);
}

Expand Down Expand Up @@ -556,7 +559,7 @@ mod tests {

assert_eq!(
execution_plan.string_representation(),
"\nResults\n Limit\n Aggregate\n Filter\n Node By Label Scan | (b:actor)\n Project\n Node By Label Scan | (a:actor)"
"\nResults\n Limit\n Aggregate\n Filter\n Node By Index Scan | (b:actor)\n Project\n Node By Label Scan | (a:actor)"
);
}

Expand Down

0 comments on commit eddc3ee

Please sign in to comment.