Add persistent licensed feature tracking#76537
Merged
rjernst merged 2 commits intoelastic:7.xfrom Aug 16, 2021
Merged
Conversation
backport of elastic#76476 Licensed feature tracking utilizes the existing license level checks to track when a feature is used. However, some features check the license level at the start of an operation or when enabling a feature, but then the tracking only captures the beginning time. This commit reworks the licensed feature framework to use a new LicensedFeature class which will eventually replace XPackLicenseState.Feature values. There are two LicensedFeature implementations, one for "momentary" features that are tracked just at the moment they are used, and "persistent" features that are considered "on" until the feature is untracked. The usage map of tracked features is cleaned up every hour, and those features that have not been used in the last 24 hours are removed from tracking. Not all features are converted to LicensedFeature yet. Instead, a few features have been converted to demonstrate how it can be done, so that the rest can be done in parallel at a future time. Co-authored-by: Tim Vernum <tim@adjective.org>
In 7.x, Elasticsearch automatically enables the file + native realms if no other (non-reserved) realms are available. In 8.0 the behaviour is different and they are enabled automatically on startup unless explicitly disabled. For this backport the behaviour of asList needs to change to retain this existing behaviour.
Member
Author
|
@elasticmachine run |
Member
Author
|
@elasticmachine run elasticsearch-ci/packaging-tests-windows-sample |
rjernst
added a commit
to rjernst/elasticsearch
that referenced
this pull request
Aug 16, 2021
This commit re-enables the bwc tests after the backport of elastic#76476. relates elastic#76537
Merged
rjernst
added a commit
that referenced
this pull request
Aug 16, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport of #76476
Licensed feature tracking utilizes the existing license level checks to
track when a feature is used. However, some features check the license
level at the start of an operation or when enabling a feature, but then
the tracking only captures the beginning time.
This commit reworks the licensed feature framework to use a new
LicensedFeature class which will eventually replace
XPackLicenseState.Feature values. There are two LicensedFeature
implementations, one for "momentary" features that are tracked just at
the moment they are used, and "persistent" features that are considered
"on" until the feature is untracked. The usage map of tracked features
is cleaned up every hour, and those features that have not been used in
the last 24 hours are removed from tracking.
Not all features are converted to LicensedFeature yet. Instead, a few
features have been converted to demonstrate how it can be done, so that
the rest can be done in parallel at a future time.
Co-authored-by: Tim Vernum tim@adjective.org