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

Don't fail if conflict-probability is zero #511

Conversation

dliappis
Copy link
Contributor

PR #510 doesn't allow setting conflict probability to 0 as the
parameter check is failing, assuming only open intervals are allowed.

Fix bug and also add a number of unit tests.

PR elastic#510 doesn't allow setting conflict probability to 0 as the
parameter check is failing, assuming only open intervals are allowed.

Fix bug and also add a number of unit tests.
@dliappis dliappis added the bug Something's wrong label May 25, 2018
Copy link
Member

@danielmitterdorfer danielmitterdorfer left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I liked the use of operator. However, can you please change the PR title to something that is more meaningful to users because it is included in the changelog?

@@ -440,7 +441,7 @@ def __init__(self, track, params, **kwargs):
raise exceptions.InvalidSyntax("Unknown 'conflicts' setting [%s]" % id_conflicts)

if self.id_conflicts != IndexIdConflict.NoConflicts:
self.conflict_probability = self.float_param(params, name="conflict-probability", default_value=25, min_value=0, max_value=100)
self.conflict_probability = self.float_param(params, name="conflict-probability", default_value=25, min_value=0, max_value=100, min_operator=operator.lt)
Copy link
Member

Choose a reason for hiding this comment

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

Interesting idea using operator.

@danielmitterdorfer danielmitterdorfer added the :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc. label May 25, 2018
@danielmitterdorfer danielmitterdorfer added this to the 0.12.0 milestone May 25, 2018
@dliappis dliappis changed the title Fix bug allowing zero conflict probability Don't fail if conflict-probability is zero May 25, 2018
@dliappis dliappis merged commit a446d87 into elastic:master May 25, 2018
@dliappis dliappis deleted the fix-interval-check-for-zero-conflict-probability branch May 25, 2018 09:01
@danielmitterdorfer danielmitterdorfer modified the milestones: 0.12.0, 1.0.0 May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's wrong :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants