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
MDU changes to support parallel processing of config repo materials #5663
Conversation
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.
What's the reasoning behind reverting this?
|
||
import java.io.File; | ||
|
||
/** | ||
* Updates configuration from repositories. | ||
*/ | ||
public class ConfigMaterialUpdateListener implements GoMessageListener<MaterialUpdateCompletedMessage> { | ||
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigMaterialUpdateListener.class); | ||
public class ConfigMaterialUpdater implements GoMessageListener<MaterialUpdateCompletedMessage> { |
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 change the class name back to ConfigMaterialUpdater
?
ConfigMaterialUpdateListener
is more consistent with the naming conventions of the other material update listeners, e.g. MaterialUpdateListerner
It's also not consistent with the listener factory nor queue for this class
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 agree on that part, would be better to have ConfigMaterialUpdateListener
import static java.util.stream.IntStream.range; | ||
|
||
@Component | ||
public class ConfigMaterialPostUpdateListenersFactory { |
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 should be named in a similar manner to the listener. Maybe this should be ConfigMaterialUpdateListersFactory
or the listener's name should change
* @understands messages about completed config material updates | ||
*/ | ||
@Component | ||
public class ConfigMaterialPostUpdateQueue extends GoMessageQueue<MaterialUpdateCompletedMessage> { |
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.
The queue name should also be consistent with the other two corresponding classes
@ibnc thanks for your inputs. I am trying to list few reasons for reverting #5550
If required I can get on a call and we can discuss this further. |
I'm not sure I agree. My thinking is that
Agreed
Makes sense.
I don't think we need to do that. I'd be curious to see what the performance boost of the PR would be. @tomzo Do you think you could test this out on the same instances you tested out #5550 on, and report back? |
I'd expect to see almost no performance boost from this PR. And, in my opinion, that's ok. The biggest benefit I see is that we can increase/decrease the number of threads for the merging config-repo materials, independently of the number of MDU threads for non-config-repo materials. I believe this was part of your PR and from what I know, that behavior continues in this one. That's where we saw the most performance boost. In this PR, the number of config material update listeners can be changed and are independent of the threads for non-config-repo materials. That's what I like about this one. Overall, I think your PR set the standard for perf. This one makes it more configurable (adds that old property back) and changes the messaging (or listener framework) so that it doesn't come back to the material update service more than once for a single material. Edit: If I understand correctly, the number of listener threads for MDU was a combination of normal material and config-repo material, after the earlier PR. The number of merging threads was introduced and made configurable. In this PR, the number of config-repo listener threads is independent of the number of non-config-repo listener threads. |
Yes that's right, listing the system properties used for configuring the threads around MDU and ConifgRepo parse/merge.
|
@tomzo your any inputs for this PR, when you get time. |
@@ -214,6 +214,8 @@ | |||
|
|||
public static GoIntSystemProperty DEPENDENCY_MATERIAL_UPDATE_LISTENERS = new GoIntSystemProperty("dependency.material.check.threads", 3); | |||
|
|||
public static GoIntSystemProperty CONFIG_MATERIAL_POST_UPDATE_LISTENERS = new GoIntSystemProperty("config.material.post.update.threads", 3); |
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.
@maheshp in the summary, you written this default was supposed to be 2
. But here we have 3.
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.
Oops, will change it to 2.
@ibnc I did build this PR and started server with all production repositories. But 19.1 removes DES support and we still have some repos with secrets encrypted with it. So I cannot really give you any number now, sorry. |
@tomzo no worries :) |
Alright, you three. You have to decide on the names for these. :) It looks like everyone is fine with the change, but not happy with the names. Here's what I think it looks like: Who wants to provide suggestions for names? The candidates for change are:
|
The suggestions I've heard are:
ConfigMaterialUpdateQueue is already taken. |
I'm in favor of going the route of I'm actually okay with the queue name not changing |
Thanks everyone. These changes were made by @maheshp. Merged. |
Refer #5673 for more details.