-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Reduce licence checks in LicensedWriteLoadForecaster
#123346
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
Reduce licence checks in LicensedWriteLoadForecaster
#123346
Conversation
Rather than checking the license (updating the usage map) on every single shard, just do it once at the start of a computation that needs to forecast write loads. Closes elastic#123247
|
Hi @DaveCTurner, I've created a changelog YAML for you. |
|
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
fcofdez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I expected that calling to that method would be cheap. Thanks for fixing this.
|
|
||
| static { | ||
| try { | ||
| VH_HAS_VALID_LICENCE_FIELD = MethodHandles.lookup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to use a VarHandle here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're checking the license state in a hot loop so I didn't want to introduce another layer of indirection on the read path, but I wanted an atomic getAndSet on the write path for the sake of getting the logging right. I'll add a comment.
|
The test failures are genuine, this'll need more work. |
Rather than checking the license (updating the usage map) on every single shard, just do it once at the start of a computation that needs to forecast write loads. Closes elastic#123247
💔 Backport failed
You can use sqren/backport to manually backport by running |
Rather than checking the license (updating the usage map) on every single shard, just do it once at the start of a computation that needs to forecast write loads. Backport of elastic#123346 to 8.x Closes elastic#123247
|
8.x-and-earlier backports in progress in #123369 |
Rather than checking the license (updating the usage map) on every single shard, just do it once at the start of a computation that needs to forecast write loads. Backport of elastic#123346 to 8.x Closes elastic#123247
Rather than checking the license (updating the usage map) on every single shard, just do it once at the start of a computation that needs to forecast write loads. Backport of elastic#123346 to 8.x Closes elastic#123247
Rather than checking the license (updating the usage map) on every single shard, just do it once at the start of a computation that needs to forecast write loads. Backport of elastic#123346 to 8.x Closes elastic#123247
Rather than checking the license (updating the usage map) on every
single shard, just do it once at the start of a computation that needs
to forecast write loads.
Closes #123247