Skip to content
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

WFLY-13063: adjust sizes of id cache and confirmation window #13350

Closed
wants to merge 3 commits into from

Conversation

michpetrov
Copy link
Contributor

Issue: WFLY-13063

id-cache-size value is the same, I just changed it not to be hard-coded on our end

confirmation-window-size changed from 1048576 to 10485760, as this seems to be intended default value as per ARTEMIS-1261

@wildfly-ci wildfly-ci added the deps-ok Dependencies have been checked, and there are no significant changes label Jun 4, 2020
Copy link
Contributor

@pferraro pferraro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ehsavoie Please review/advise.

In general, changes to an attribute's default value will require:

To achieve this, you can utilize this AttributeConverter instance:
https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/transform/description/AttributeConverter.java#L97

With this in place, there should be no need to "fix" the model in the subsystem transformer tests.

Copy link
Contributor

@ehsavoie ehsavoie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is going to miss WildFly 20 you need to bump the schema version.You should rebase your work over ehsavoie@a6ebd35. You should manage the model transformation in MessagingTransformerRegistration and not use ModelFixer as @pferraro wrote.

@michpetrov
Copy link
Contributor Author

Ok, I'll look into that. What's the difference between ModelFixer and Transformer? They seem to be doing the same thing.

@ehsavoie
Copy link
Contributor

ehsavoie commented Jun 5, 2020

ModelFixer 'fix' the model for tests.
Transformers transform the model for retro compatibility in domain mode

 * bump messaging schema to 11
 * bump messaging model to 11

Jira: https://issues.redhat.com/browse/WFLY-13518
Copy link
Contributor

@bstansberry bstansberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ehsavoie The comments I've made here are really more for you than for @michpetrov. The subsystem's management API is fragile because of the use of these values from Artemis.

There's benefit to using the Artemis values. Perhaps we can have a subsystem test that validates all the defaults against a static value? If Artemis changes one, the test would inform us and then you can decide what to do.

@@ -105,7 +105,7 @@
.build();

SimpleAttributeDefinition BRIDGE_CONFIRMATION_WINDOW_SIZE = create("confirmation-window-size", INT)
.setDefaultValue(new ModelNode(FileConfiguration.DEFAULT_CONFIRMATION_WINDOW_SIZE))
.setDefaultValue(new ModelNode(ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our default values need to be statically declared in our own code base, and not be dependent on external libraries which can change without us noticing.

That or we have to have some test that will notice if any of the values change so we can update the API version, do transformation etc.

The code you're changing already had this problem, so you're not introducing any new problem.

@@ -699,7 +699,7 @@
* @see ActiveMQDefaultConfiguration#getDefaultIdCacheSize
*/
public static final SimpleAttributeDefinition ID_CACHE_SIZE = create("id-cache-size", INT)
.setDefaultValue(new ModelNode(20000))
.setDefaultValue(new ModelNode(ActiveMQDefaultConfiguration.getDefaultIdCacheSize()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you are introducing a new problem by converting a static value to a changeable one.

@ehsavoie
Copy link
Contributor

ehsavoie commented Jun 9, 2020

@bstansberry I removed all the references to ActiveMQDefaultConfiguration but it looks like i missed some other Artemis related default configuration. I've created https://issues.redhat.com/browse/WFLY-13575 to track this

@michpetrov
Copy link
Contributor Author

I have refactored the PR.

@pferraro pferraro self-requested a review June 16, 2020 12:51
@michpetrov
Copy link
Contributor Author

@ehsavoie gotcha, I've updated the file

@bstansberry
Copy link
Contributor

/retest

@bstansberry
Copy link
Contributor

Superseded by #14095

@bstansberry bstansberry closed this Mar 8, 2021
@michpetrov michpetrov deleted the wfly-13063 branch March 10, 2021 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps-ok Dependencies have been checked, and there are no significant changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants