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

Index set fixes #3193

Merged
merged 9 commits into from Dec 13, 2016

Conversation

Projects
None yet
2 participants
@bernd
Member

bernd commented Dec 13, 2016

  • Create an unique index on the index_prefix field in MongoDB
  • Handle DuplicateKeyException in the index sets resource
  • Add a warning to the UPGRADING file about rotation/retention plugins
  • Implement some checks to avoid the creation of index sets with conflicting index prefixes

bernd added some commits Dec 12, 2016

Improve index set creation API robustness
- Check if the index prefix is already managed by some other index set
- Do not allow to update settings like index prefix, index match pattern
  and index wildcard via the API
Create IndexSetValidator
This is used to run some checks on a new index set config to avoid
conflicts with existing index sets.

@bernd bernd added this to the 2.2.0 milestone Dec 13, 2016

@joschi joschi self-assigned this Dec 13, 2016

}
@AutoValue
public static abstract class Error {

This comment has been minimized.

@joschi

joschi Dec 13, 2016

Contributor

Maybe call it Violation (similar to ConstraintViolation in javax.validation).

I'm not totally comfortable with the naming of the class because of Error.

This comment has been minimized.

@bernd
public abstract String description();
@JsonProperty("default")
public abstract boolean isDefault();

This comment has been minimized.

@joschi

joschi Dec 13, 2016

Contributor

Should it be possible to change that flag on an existing index set?

What happens if there is more than one index set with default == true?

This comment has been minimized.

@joschi

joschi Dec 13, 2016

Contributor

Same applies for creating an index set, of course.

This comment has been minimized.

@bernd

bernd Dec 13, 2016

Member

Yes, it should be possible to change that. This is still an open TODO and needs to be implemented. We have to ensure that only one index set can be the default one.

This comment has been minimized.

@joschi

joschi Dec 13, 2016

Contributor

import javax.inject.Inject;
import java.util.Optional;
public class IndexSetValidator {

This comment has been minimized.

@joschi

joschi Dec 13, 2016

Contributor

👍 for extracting this logic into its own class.

@joschi joschi referenced this pull request Dec 13, 2016

Closed

Support for multiple retention strategies #2880

23 of 27 tasks complete
@bernd

This comment has been minimized.

Member

bernd commented Dec 13, 2016

Renamed the Error class to Violation.

@joschi

joschi approved these changes Dec 13, 2016

@joschi joschi merged commit d851d11 into master Dec 13, 2016

4 checks passed

ci-web-linter Jenkins build graylog-pr-linter-check 1137 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details

@joschi joschi deleted the index-set-fixes branch Dec 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment