Skip to content

Multipath - Add MGET backward compatibility - #497

Merged
oshadmi merged 3 commits into
masterfrom
omer_mget_bwc
Oct 31, 2021
Merged

oshadmi merged 3 commits into
masterfrom
omer_mget_bwc

Conversation

@oshadmi

@oshadmi oshadmi commented Oct 31, 2021

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread tests/pytest/test.py
for d in range(0, 5):
key = 'doc:{}'.format(d)
r.assertEqual(json.loads(raw[d]), [docs['basic']], d)
r.assertEqual(json.loads(raw[d]), docs['basic'], d)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I guess this reverts the tests changes?

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.

Yes, the previous change ignored the previous behavior. Since the path here starts with a ., the old behavior is now kept.

r.assertOk(r.execute_command('JSON.SET', 'doc1', '$', '{"a":1, "b": 2, "nested": {"a": 3}, "c": null, "nested2": {"a": null}} '))
r.assertOk(r.execute_command('JSON.SET', 'doc2', '$', '{"a":4, "b": 5, "nested": {"a": 6}, "c": null, "nested2": {"a": [null]}}'))
r.assertOk(r.execute_command('JSON.SET', 'doc1', '$', '{"a":1, "b": 2, "nested1": {"a": 3}, "c": null, "nested2": {"a": null}}'))
r.assertOk(r.execute_command('JSON.SET', 'doc2', '$', '{"a":4, "b": 5, "nested3": {"a": 6}, "c": null, "nested4": {"a": [null]}}'))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you explain this change?

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.

Wanted a path that would match only one of the keys (for the missing path/key scenario)

@MeirShpilraien MeirShpilraien Oct 31, 2021 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

So why change an existing test and not add a new one?

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.

This had no impact on existing tests (just names of internal paths)
And it is now used in a new test

@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.

Small questions

@oshadmi
oshadmi merged commit a49fadd into master Oct 31, 2021
@oshadmi
oshadmi deleted the omer_mget_bwc branch October 31, 2021 15:15
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.

2 participants