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

ARTEMIS-5100 support journal-max-io on 'create' CLI command #5455

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

jbertram
Copy link
Contributor

I struggled to decide the name of the input, ultimately settling on --aio-journal-max-io to clarify that it only applies to journal-max-io when using aio.

@@ -327,6 +327,9 @@ public String[] getStaticNodes() {
@Option(names = "--jdbc-lock-expiration", description = "Lock expiration (in milliseconds).")
long jdbcLockExpiration = ActiveMQDefaultConfiguration.getDefaultJdbcLockExpirationMillis();

@Option(names = "--aio-journal-max-io", description = "The journal-max-io value to use when also using the ASYNCIO journal-type. When using NIO or MAPPED this value is always '1'. Default: 4096")
Copy link
Contributor

@clebertsuconic clebertsuconic Jan 22, 2025

Choose a reason for hiding this comment

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

what about --journal-max-aio?

(journal max asynchronous io).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's not bad!

@jbertram jbertram force-pushed the ARTEMIS-5100 branch 2 times, most recently from da89995 to 3573581 Compare January 24, 2025 18:21
@@ -327,6 +327,9 @@ public String[] getStaticNodes() {
@Option(names = "--jdbc-lock-expiration", description = "Lock expiration (in milliseconds).")
long jdbcLockExpiration = ActiveMQDefaultConfiguration.getDefaultJdbcLockExpirationMillis();

@Option(names = "--journal-max-aio", description = "The journal-max-io value to use when also using the ASYNCIO journal-type. When using NIO or MAPPED this value is always '1'. Default: 4096")
Copy link
Member

Choose a reason for hiding this comment

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

Regardless what it is called, I would move this up beside the other journal related options rather than adding it after all the jdbc options (if there isnt some constraint preventing it).

The configuration impl class uses a suffix for its fields based on the journal type, JournalMaxIO_NIO and JournalMaxIO_AIO, so I'd wonder if such suffix naming convention transfers over to broker-properties usage somehow and if so might --journal-max-io-aio fit with it for alignment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using the same pattern as broker properties would yield something like --journal-max-io_aio or maybe --journal-max-io-aio. I think the latter would be OK. It's one of the options I originally considered.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think journal-max-io-aio would be fine. I think I'd at least try to make those two use cases align if possible, if it it is not just going to be using --journal-max-io to match the xml (which I also think would be fine, I dont think its any more confusing than the XML element always being named and being present even if its not doing anything; the CLI description makes clear enough when the option applies, and it wont have any effect in non-applicable cases regardless what it is named).

Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer journal-max-aio

io-aio sounds redundant to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

io-aio sounds redundant to me.

It is a little redundant, but it's no more redundant than Configuration.setJournalMaxIO_AIO, Configuration.setJournalMaxIO_NIO, etc. which is also reflected in broker properties.

Copy link
Member

Choose a reason for hiding this comment

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

It is a little redundant, but also more consistent and less likely to confuse.

For me --journal-max-aio is a bit off because it is so similar to, but still not the same as, the actual journal-max-io XML element setting it is actually for controlling. I expect that would trip some folks up, both in finding it, and in using it. I would just use --journal-max-io in preference to --journal-max-aio personally. The different ways of configuring journal-max-io would then at least all include journal-max-io in their naming in some form, either partially or as the whole name.

If we use journal-max-aio we will then have 3 different names for configuration for the same thing, one of which doesnt even contain the name journal-max-io despite directly existing to govern that XML element.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think there's a direct reference between the Create command and their XML elements... these are distinct namespaces to me.

--journal-max-io-aio won't make it much better... if we are concerned we would have to find a totally different name such as --journal-limit-aio...

i think --journal-max-aio for this case is fine.. since there are no other similar parameters on the Create

that's my opinion on this, but I'm not strong opinionated ... if you guys want to go against what I think... I wouldn't fight over :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I settled on --journal-max-io just like we already have in the XML. Although it's not perfectly descriptive at least it's consistent, and the help text should provide enough information to clarify how to use it.

@jbertram jbertram force-pushed the ARTEMIS-5100 branch 3 times, most recently from e1cb57c to bd70e7d Compare January 31, 2025 04:29
@gemmellr gemmellr merged commit 89b4761 into apache:main Jan 31, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants