Skip to content

Merge multipath PRs (#473 and #477) #487

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
wants to merge 44 commits into from
Closed

Merge multipath PRs (#473 and #477) #487

wants to merge 44 commits into from

Conversation

oshadmi
Copy link
Collaborator

@oshadmi oshadmi commented Oct 27, 2021

Copy link
Collaborator Author

@oshadmi oshadmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed per @MeirShpilraien 's review (except for splitting tests that will be done later)

Cargo.toml Outdated
@@ -14,7 +14,7 @@ bson = "0.14"
serde_json = "1.0"
serde = "1.0"
libc = "0.2"
jsonpath_lib = { git = "https://github.com/RedisJSON/jsonpath.git", branch = "generic_json_path" }
jsonpath_lib = { git = "https://github.com/RedisJSON/jsonpath.git", branch = "omer-multipath-api" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to change it back once you merge: RedisJSON/jsonpath#18

src/commands.rs Outdated
_ => RedisValue::Null,
});
}
redis_key.apply_changes(ctx, "json.arrtrim")?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no changes were made you will still fire the notification no? Also, let's make sure we have a test for it.

src/commands.rs Outdated
});
}

redis_key.apply_changes(ctx, "json.arrinsert")?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here, you will fire notification anyway no? And also, let's make sure we have a test for it.

src/commands.rs Outdated
_ => RedisValue::Null,
});
}
redis_key.apply_changes(ctx, "json.arrappend")?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notification

src/commands.rs Outdated
_ => RedisValue::Null,
});
}
redis_key.apply_changes(ctx, "json.strappend")?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notification + test

None => RedisValue::Null,
});
}
if need_notify {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

src/commands.rs Outdated
_ => None,
});
}
redis_key.apply_changes(ctx, cmd)?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notification + test

newline: Option<&str>,
space: Option<&str>,
) -> Result<RedisValue, Error> {
if paths.len() > 1 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the new API I think its better to behave the same on single path and multi path, i.e always return an array (worst case it will be an array of size 1), @emmanuel-keller WDYT?

Copy link
Collaborator

@MeirShpilraien MeirShpilraien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good, added some more comments.
The most important is to not fire notification if nothing happened, and I guess we also do not have tests for it so let's add it.

oshadmi added a commit that referenced this pull request Oct 28, 2021
oshadmi added a commit that referenced this pull request Oct 28, 2021
* Multi path: del - add test and doc

* WIP [skip ci] Multi path: get multi value and multi path

* Multi path: fix multi value/path (not yet resp array)

* Multi path: mget multi value/path and test fixes

* Multi path: numincrby nummultby numpowby

* Multi path: get fails with legacy path

* Multi path: Try using jsonpath lib api select_values_with_paths

* Multi path: Workaround without jsonpath lib api select_values_with_paths

* Multi path: strappend strlen

* Multi path: arrappend

* Multi path: arrinsert

* Multi path: arrlen

* Multi path: arrpop

* Multi path: arrtrim

* Multi path: avoid crash in arrtrim (fix ArrayIndex normalize)

* Multi path: objkeys

* Multi path: objlen and type commands

* Multi path: toggle command

* Multi path: debug memory commands

* Multi path: debug memory fix test

* Multi path: json.type without get_type_name api

* Multi path: json.resp

* Multi path: temporarily build macos *on-any-branch

* Multi path: restore legacy backward compatibility for numXby strlen strappend

* Multipath - merge from temp PR #487
@oshadmi
Copy link
Collaborator Author

oshadmi commented Nov 8, 2021

Not needed (this PR was needed for early integration testing. Individual PRs were merged)

@oshadmi oshadmi closed this Nov 8, 2021
@rafie rafie deleted the omer_multipath_2 branch November 13, 2022 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants