-
Notifications
You must be signed in to change notification settings - Fork 3
feat: RDB persistence, virtual keys, and module wiring #384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c8070d4
feat: RDB persistence, virtual keys, module wiring, and tests
AviAvni 0ea80d1
fix: pass references to delete_relationships for improved performance
AviAvni 3e292ff
fix: handle uninitialized fjall keyspace to prevent unnecessary keysp…
AviAvni 6160c2d
feat: implement bulk loading of attributes from fjall for RDB save op…
AviAvni 59b5db4
feat: build RDB attribute snapshots before fork to avoid fjall in child
AviAvni 5814f9f
fix: disable Redis auto-save in tests and fix cargo fmt
AviAvni 3922528
perf: skip RDB snapshot building for graphs without fjall data
AviAvni 45b8f1d
perf: avoid unnecessary cache inserts for entities without properties
AviAvni 4351800
perf: use static EMPTY_ATTRS and fix benchmark Popen --save arg
AviAvni 1ef41be
fix: use shutdown-on-sigterm save to fix UDF persistence without auto…
AviAvni 08f5baf
Merge remote-tracking branch 'origin/main' into rdb-persistence-wiring
Copilot 7489673
Merge remote-tracking branch 'origin/main' into rdb-persistence-wiring
Copilot 3eddc7e
fix: pass &explicit_rels to delete_relationships (by-ref, not by-value)
Copilot 1475c31
test: increase BGSAVE wait timeout from 10s to 60s in test_persistenc…
Copilot 7148faa
test: reduce graph_count 1000→100 and drain BGSAVE before returning i…
Copilot acb1231
perf: replace per-edge GxB_Iterator in Tensor::encode with single me …
Copilot 39bc72e
Revert "test: reduce graph_count 1000→100 and drain BGSAVE before ret…
AviAvni ff1f525
Revert "test: increase BGSAVE wait timeout from 10s to 60s in test_pe…
AviAvni f826116
chore: remove obsolete Redis configuration settings from redis.conf
AviAvni 6326a1a
feat: add initial flow tests for various features and functionalities
AviAvni 8bdf13b
Merge branch 'main' into rdb-persistence-wiring
AviAvni f836ca9
feat: Add bulk operations for UINT64 entries and tuple extraction in …
AviAvni 04fabe2
feat: Optimize UINT64 matrix encoding and reduce redundant computatio…
AviAvni a97d2f1
Merge branch 'main' into rdb-persistence-wiring
Copilot f2408e6
fmt
AviAvni b1efe01
Merge branch 'main' into rdb-persistence-wiring
AviAvni 43dc78d
refactor: Improve pattern matching and variable handling across multi…
AviAvni 3a8e0da
feat: Integrate rustc-hash for improved performance in attribute stor…
AviAvni 7ec1d7b
refactor: Remove test_persistency from completed tests and add it to …
AviAvni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| use crate::redis_type::{create_virtual_keys, delete_stale_virtual_keys, finalize_pending_graphs}; | ||
| use crate::serializers::DECODE_STATE; | ||
| use redis_module::{Context, NextArg, RedisError, RedisResult, RedisString, RedisValue}; | ||
|
|
||
| pub fn graph_debug( | ||
| ctx: &Context, | ||
| args: Vec<RedisString>, | ||
| ) -> RedisResult { | ||
| if args.len() < 3 { | ||
| return Err(RedisError::WrongArity); | ||
| } | ||
| let mut args_iter = args.into_iter().skip(1); | ||
| let subcmd = args_iter.next_str()?; | ||
|
|
||
| match subcmd.to_uppercase().as_str() { | ||
| "AUX" => debug_aux(ctx, args_iter), | ||
| _ => Err(RedisError::String(format!( | ||
| "Unknown DEBUG subcommand: {subcmd}" | ||
| ))), | ||
| } | ||
| } | ||
|
|
||
| fn debug_aux( | ||
| ctx: &Context, | ||
| mut args: impl Iterator<Item = RedisString>, | ||
| ) -> RedisResult { | ||
| let action = args.next_str()?; | ||
| match action.to_uppercase().as_str() { | ||
| "START" => { | ||
| DECODE_STATE.lock().clear(); | ||
| unsafe { create_virtual_keys(ctx.ctx) }; | ||
| Ok(RedisValue::Integer(1)) | ||
| } | ||
| "END" => { | ||
| finalize_pending_graphs(); | ||
| unsafe { delete_stale_virtual_keys(ctx.ctx) }; | ||
| Ok(RedisValue::Integer(0)) | ||
| } | ||
| _ => Err(RedisError::String(format!("Unknown AUX action: {action}"))), | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the schema-version check into the serialized execution path.
These comparisons run before
query_mut(...), so another writer can change the schema between the check and the actual query execution. That leaves a TOCTOU window where stale clients still get through, or valid clients are checked against an older snapshot. Validateversion_checkafter the request has entered the same queue/lock that executes the query.Based on learnings, Redis
GRAPH.QUERYcommand must accept both read and write Cypher queries and block client during execution.Also applies to: 98-112