-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Repo analysis: allow configuration of register ops #102051
Repo analysis: allow configuration of register ops #102051
Conversation
Adds the `?register_operation_count` parameter that allows to control the number of register operations separately from the number of regular blob operations.
Documentation preview: |
Pinging @elastic/es-distributed (Team:Distributed) |
Hi @DaveCTurner, I've created a changelog YAML for you. |
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.
I have a question about usage of synchronization in test.
.../src/main/java/org/elasticsearch/repositories/blobstore/testkit/RepositoryAnalyzeAction.java
Outdated
Show resolved
Hide resolved
@@ -488,7 +488,7 @@ public void run() { | |||
) | |||
) | |||
) { | |||
final int registerOperations = Math.max(nodes.size(), request.getConcurrency()); | |||
final int registerOperations = Math.max(nodes.size(), request.getRegisterOperationCount()); |
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.
This doc says the number of register operation defaults to 10. But the actual number is a max between number of nodes and number of register operations. Should we explain this nuance in the doc?
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.
I'm inclined to say no, because I tried describing this in the docs and it just seemed to make it harder to understand. We do more uncontended register ops too because they carry on until the contended ones finish. I'd be amazed if anyone notices this in practice.
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.
Eh how about a93f159? Added the word minimum
to those docs, I think that covers everything simply enough.
synchronized (registerMutex) { | ||
witness = registers.computeIfAbsent(key, ignored -> new BytesRegister()).compareAndExchange(expected, updated); |
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.
Does this synchronization introduce an artificial serialization of operations that means we are not really testing compareAndExchange
in a concurrent fashion? Is this a problem?
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.
No, the correctness of this compareAndExchange
(itself implemented as a synchronized
method) isn't really the subject of this test. I added a comment in 2b4b3c7.
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
Adds the `?register_operation_count` parameter that allows to control the number of register operations separately from the number of regular blob operations.
In 8.12 users can configure the number of register operations performed by repository analysis, but this configuration is not available in earlier versions. Nonetheless, we should at least mention that repository analysis does some register operations. This commit backports the few relevant lines of the docs changes from elastic#102051 to earlier branches. Relates elastic#102050
In 8.12 users can configure the number of register operations performed by repository analysis, but this configuration is not available in earlier versions. Nonetheless, we should at least mention that repository analysis does some register operations. This commit backports the few relevant lines of the docs changes from #102051 to earlier branches. Relates #102050
In 8.12 users can configure the number of register operations performed by repository analysis, but this configuration is not available in earlier versions. Nonetheless, we should at least mention that repository analysis does some register operations. This commit backports the few relevant lines of the docs changes from elastic#102051 to earlier branches. Relates elastic#102050
In 8.12 users can configure the number of register operations performed by repository analysis, but this configuration is not available in earlier versions. Nonetheless, we should at least mention that repository analysis does some register operations. This commit backports the few relevant lines of the docs changes from elastic#102051 to earlier branches. Relates elastic#102050
In 8.12 users can configure the number of register operations performed by repository analysis, but this configuration is not available in earlier versions. Nonetheless, we should at least mention that repository analysis does some register operations. This commit backports the few relevant lines of the docs changes from elastic#102051 to earlier branches. Relates elastic#102050
In 8.12 users can configure the number of register operations performed by repository analysis, but this configuration is not available in earlier versions. Nonetheless, we should at least mention that repository analysis does some register operations. This commit backports the few relevant lines of the docs changes from #102051 to earlier branches. Relates #102050
In 8.12 users can configure the number of register operations performed by repository analysis, but this configuration is not available in earlier versions. Nonetheless, we should at least mention that repository analysis does some register operations. This commit backports the few relevant lines of the docs changes from #102051 to earlier branches. Relates #102050
In 8.12 users can configure the number of register operations performed by repository analysis, but this configuration is not available in earlier versions. Nonetheless, we should at least mention that repository analysis does some register operations. This commit backports the few relevant lines of the docs changes from #102051 to earlier branches. Relates #102050
Adds the
?register_operation_count
parameter that allows to controlthe number of register operations separately from the number of regular
blob operations.