-
Notifications
You must be signed in to change notification settings - Fork 3
Implement RDB serialization and deserialization for graph data #359
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
Closed
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
65c0416
Implement RDB serialization and deserialization for graph data
AviAvni 20171d8
feat: add GRAPH.DEBUG command for RDB load management and testing
AviAvni 3ce7c6d
refactor: improve concurrency and error handling in graph serializati…
AviAvni 788c6f2
style: format code for improved readability in multiple files
AviAvni f1be7a0
feat: add falkordb-bulk-loader to Python dependencies and update enco…
AviAvni b560f8c
feat: add schema version management to Graph and MVCCGraph for versio…
AviAvni 4a81b3a
feat: add test for graph versioning and remove from todo list
AviAvni 179e0be
feat: add EFFECTS_THRESHOLD as a runtime-configurable value
AviAvni 6c29a53
Implement effects replication for graph mutations
AviAvni 89c6855
feat: move test_effects.py from todo to done list
AviAvni 6fb14c4
Merge branch 'main' into rdb
AviAvni f0a39b0
Implement reserved node and relationship counters, enhance index effe…
AviAvni 844c53d
Merge branch 'main' into rdb
AviAvni 3f4c27c
fix: remove unnecessary whitespace in apply_effects function
AviAvni 727eadb
Merge branch 'main' into rdb
AviAvni 47b6943
feat: add replication of changes after committing graph effects
AviAvni e87dc11
feat: include modified flag in query execution results for replicatio…
AviAvni ec86753
feat: ensure capacity for highest node and relationship IDs during ef…
AviAvni 359c49c
feat: add UINT64 support for edge IDs in matrix and tensor implementa…
AviAvni 791aca7
feat: add UINT64 support for matrices and tensors, update Redis key h…
AviAvni 99fd3e1
refactor: reorganize import statements for clarity and consistency
AviAvni 77315ca
Merge branch 'main' into rdb
AviAvni d74a121
feat: implement dynamic resizing for graph node and relationship matr…
AviAvni a2b54e7
refactor: optimize effects handling in commit operation and add clear…
AviAvni 890a23a
feat: add support for non-deterministic function detection in query p…
AviAvni d1a2377
feat: enhance attribute handling in Pending for new and existing node…
AviAvni 774635c
feat: add disk space cleanup step in CI workflows for rust-pr and rus…
AviAvni fc3707e
refactor: replace unwrap() with direct lock() calls for DECODE_STATE …
AviAvni 76ef617
feat: improve disk space cleanup in CI workflows for rust-pr and rust…
AviAvni 3b7736d
refactor: simplify match statement in eval_row and improve function s…
AviAvni 057c9c4
fix: dynamically set parallelism based on available CPU cores
AviAvni f33e2bb
feat: set parallelism for flow tests in CI workflows
AviAvni a3e65ee
fix: update flow test parallelism syntax in CI workflows
AviAvni a7a4bb6
refactor: update matrix resizing logic in rebuild_derived_matrices fo…
AviAvni 8db5fed
feat: add redis configuration support to flow tests and update RLTest…
AviAvni 103d9aa
refactor: remove redundant disk space cleanup steps from CI workflows
AviAvni c320f66
fix: update flow test execution to include release flag and remove pa…
AviAvni 6c38250
refactor: simplify database handling in AttributeStore and Graph init…
AviAvni 6722aff
refactor: streamline virtual key management by consolidating key dele…
AviAvni d4528ed
refactor: optimize virtual key management and encoding context handling
AviAvni a0b7ea3
refactor: optimize attribute cache and store to use Arc for improved …
AviAvni 0cd9ddc
Merge branch 'main' into rdb
AviAvni 7a1be98
refactor: optimize memory calculations and improve index query handling
AviAvni 39f2155
Merge branch 'main' into rdb
AviAvni f8d7c07
merge: resolve conflicts after merging main into rdb
AviAvni 056f466
Merge branch 'main' into rdb
AviAvni 7c14cc8
Merge branch 'main' into rdb
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 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
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.
Gate
graph.DEBUGbehind a test/admin-only switch.This command can clear global decode state, create/delete virtual keys, and finalize pending RDB loads. Registering it unconditionally makes those internal persistence controls callable by any client on a production server.
🤖 Prompt for AI Agents