Skip to content

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

Closed
oshadmi wants to merge 44 commits into
masterfrom
omer_multipath_2
Closed

oshadmi wants to merge 44 commits into
masterfrom
omer_multipath_2

Conversation

@oshadmi

@oshadmi oshadmi commented Oct 27, 2021

Copy link
Copy Markdown
Collaborator

Comment thread src/manager.rs Resolved
Comment thread src/redisjson.rs Resolved
Comment thread tests/pytest/test_multi.py Resolved
Comment thread tests/pytest/test_multi.py Resolved
Comment thread src/commands.rs Resolved
Comment thread src/commands.rs Resolved
Comment thread src/commands.rs Resolved
Comment thread src/commands.rs Resolved

@oshadmi oshadmi left a comment

Copy link
Copy Markdown
Collaborator Author

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)

Comment thread src/commands.rs Resolved
Comment thread src/commands.rs Resolved
Comment thread src/manager.rs Resolved
Comment thread tests/pytest/test_multi.py Resolved
Comment thread Cargo.toml Outdated
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
Copy Markdown

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

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

Copy link
Copy Markdown

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.

Comment thread src/commands.rs Outdated
});
}

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

Copy link
Copy Markdown

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.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Notification

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Notification + test

Comment thread src/commands.rs
None => RedisValue::Null,
});
}
if need_notify {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

notification + test

Comment thread src/commands.rs
newline: Option<&str>,
space: Option<&str>,
) -> Result<RedisValue, Error> {
if paths.len() > 1 {

Copy link
Copy Markdown

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?

@MeirShpilraien MeirShpilraien left a comment

Copy link
Copy Markdown

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

oshadmi commented Nov 8, 2021

Copy link
Copy Markdown
Collaborator Author

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