Skip to content

Return no updates when performing an NX set to an existing array element - #593

Merged
oshadmi merged 5 commits into
RedisJSON:masterfrom
EricRabil:fix_#592_set_nx_array
Jan 9, 2022
Merged

oshadmi merged 5 commits into
RedisJSON:masterfrom
EricRabil:fix_#592_set_nx_array

Conversation

@EricRabil

Copy link
Copy Markdown
Contributor

This PR addresses #592, although I'd like some feedback from other contributors on how I fixed it as I'm not sure if this is intentional behavior.

This does not modify the mutations made to the document, but instead stops returning an out-of-range error when doing an NX set to an array element that is, in fact, in range.

@CLAassistant

CLAassistant commented Dec 26, 2021 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@gkorland
gkorland requested a review from oshadmi December 26, 2021 05:46
@oshadmi

oshadmi commented Dec 26, 2021

Copy link
Copy Markdown
Collaborator

Related comment

@oshadmi

oshadmi commented Dec 28, 2021

Copy link
Copy Markdown
Collaborator

@EricRabil Thank you for your fix. It looks good. We will be happy to merge it once tests are added.
Please let us know if you are available to add tests (if not, we will add)

@EricRabil

EricRabil commented Dec 28, 2021 •

Copy link
Copy Markdown
Contributor Author

Awesome. I'll add tests within the next day

@EricRabil

Copy link
Copy Markdown
Contributor Author

@oshadmi tests have been added, let me know if you'd like any changes to be made to them.

@oshadmi oshadmi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Minor addition.
Thanks!

Comment thread tests/pytest/test.py Resolved
Co-authored-by: Omer Shadmi <76992134+oshadmi@users.noreply.github.com>
@EricRabil

Copy link
Copy Markdown
Contributor Author

@oshadmi do you have any additional changes for me to make?

@codecov

codecov Bot commented Jan 9, 2022

Copy link
Copy Markdown

Codecov Report

Merging #593 (ef3d10a) into master (13a668a) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #593      +/-   ##
==========================================
+ Coverage   82.99%   83.02%   +0.03%     
==========================================
  Files          11       11              
  Lines        3116     3123       +7     
==========================================
+ Hits         2586     2593       +7     
  Misses        530      530              
Impacted Files Coverage Δ
src/commands.rs 95.33% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13a668a...ef3d10a. Read the comment docs.

@oshadmi oshadmi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍🏼

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.

Using NX when setting to an existing array element returns index out of range

3 participants