Skip to content
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

mon: MonitorDBStore: get_next_key() only if prefix matches #5360

Merged
2 commits merged into from Oct 20, 2015

Conversation

Projects
None yet
2 participants
@jecluis
Copy link
Member

commented Jul 27, 2015

mon: MonitorDBStore: get_next_key() only if prefix matches
get_next_key() had a bug in which we would always return the first key
from the iterator, regardless of whether its prefix had been specified
to the iterator.

Fixes: #11786

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
(cherry picked from commit 2cc7aee)

@jecluis jecluis added this to the firefly milestone Jul 27, 2015

@ghost ghost removed the needs-qa label Jul 28, 2015

@ghost ghost self-assigned this Jul 28, 2015

@ghost ghost changed the title mon: MonitorDBStore: get_next_key() only if prefix matches DNM: mon: MonitorDBStore: get_next_key() only if prefix matches Sep 1, 2015

@ghost

This comment has been minimized.

Copy link

commented Sep 1, 2015

@smithfarm could you add the command line you used to reproduce the problem ? It'll be useful to verify it's fixed.

@jecluis

This comment has been minimized.

Copy link
Member Author

commented Sep 1, 2015

I've got a patch that fixes this. Just need to figure out why it doesn't break in master first.

@ghost

This comment has been minimized.

Copy link

commented Sep 7, 2015

Also cherry-pick #5834 to make it work

@jecluis

This comment has been minimized.

Copy link
Member Author

commented Sep 9, 2015

patch to be cherry-picked is 70d3108

mon: MonitorDBStore: make get_next_key() work properly
We introduced a significant bug with 2cc7aee, when we fixed issue #11786.
Although that patch would fix the problem described in #11786, we
managed to not increment the iterator upon returning the current key.
This would have the iterator iterating over the same key, forever and
ever.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
(cherry picked from commit 70d3108)
@jecluis

This comment has been minimized.

Copy link
Member Author

commented Sep 9, 2015

I cherry-picked it myself. Feel free to run this through firefly integration tests.

@jecluis jecluis added the needs-qa label Sep 9, 2015

@ghost ghost removed the needs-qa label Sep 9, 2015

@ghost ghost changed the title DNM: mon: MonitorDBStore: get_next_key() only if prefix matches mon: MonitorDBStore: get_next_key() only if prefix matches Sep 9, 2015

@ghost

This comment has been minimized.

Copy link

commented Sep 9, 2015

@jecluis thanks !

ghost pushed a commit that referenced this pull request Oct 20, 2015

Merge pull request #5360: mon: MonitorDBStore: get_next_key() only if…
… prefix matches

Reviewed-by: Loic Dachary <ldachary@redhat.com>

ghost pushed a commit that referenced this pull request Oct 20, 2015

Loic Dachary
Merge pull request #5360 from ceph/wip-11786.firefly
mon: MonitorDBStore: get_next_key() only if prefix matches

Reviewed-by: Loic Dachary <ldachary@redhat.com>

@ghost ghost merged commit 4a1e54f into firefly Oct 20, 2015

@liewegas liewegas deleted the wip-11786.firefly branch Nov 23, 2016

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.