Skip to content

[CASSANDRA-21089][trunk] Change default for cassandra.set_sep_thread_name to false + invoke Thread.setName only if an phase changed#4539

Closed
netudima wants to merge 1 commit intoapache:trunkfrom
netudima:sep_thread_name-trunk
Closed

[CASSANDRA-21089][trunk] Change default for cassandra.set_sep_thread_name to false + invoke Thread.setName only if an phase changed#4539
netudima wants to merge 1 commit intoapache:trunkfrom
netudima:sep_thread_name-trunk

Conversation

@netudima
Copy link
Copy Markdown
Contributor

No description provided.

SEED_COUNT_WARN_THRESHOLD("cassandra.seed_count_warn_threshold"),
SERIALIZATION_EMPTY_TYPE_NONEMPTY_BEHAVIOR("cassandra.serialization.emptytype.nonempty_behavior"),
SET_SEP_THREAD_NAME("cassandra.set_sep_thread_name", "true"),
SET_SEP_THREAD_NAME("cassandra.set_sep_thread_name", "false"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we make this a hot-prop so it can be toggled via JMX?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think, yes, it would cost 1 volatile read but I suppose it is an acceptable cost for this place

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't see a lot of value allowing this to be changed via JMX. @aratno what is the idea here? Do you see use cases where we might need to toggle this during runtime

Copy link
Copy Markdown
Contributor Author

@netudima netudima Apr 15, 2026

Choose a reason for hiding this comment

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

originally I thought that it would be easy to do, but then I have realised that there is no suitable existing JMX bean for it and I'll have to introduce a new one, so it becomes more expensive (add bean, publication for it, unregistering, API to retrieve the value), so this is why actually the change is still non-merged :-).
If we do not have a real case I would suggest to keep the current change simple, with ability to change the parameter via restart, and add the runtime change feature later in case of a real demand.

Comment thread src/java/org/apache/cassandra/concurrent/SEPWorker.java Outdated
Copy link
Copy Markdown
Contributor

@frankgh frankgh left a comment

Choose a reason for hiding this comment

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

+1 Looks good to me

SEED_COUNT_WARN_THRESHOLD("cassandra.seed_count_warn_threshold"),
SERIALIZATION_EMPTY_TYPE_NONEMPTY_BEHAVIOR("cassandra.serialization.emptytype.nonempty_behavior"),
SET_SEP_THREAD_NAME("cassandra.set_sep_thread_name", "true"),
SET_SEP_THREAD_NAME("cassandra.set_sep_thread_name", "false"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't see a lot of value allowing this to be changed via JMX. @aratno what is the idea here? Do you see use cases where we might need to toggle this during runtime

@netudima netudima force-pushed the sep_thread_name-trunk branch from 815ae8e to ca7568e Compare April 15, 2026 11:49
Copy link
Copy Markdown
Contributor

@frankgh frankgh left a comment

Choose a reason for hiding this comment

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

+1 looks good to me

…PU usage

Add an extra optimization if it is enabled: invoke Thread.setName only if an phase changed

patch by Dmitry Konstantinov; reviewed by Francisco Guerrero, Jyothsna Konisa for CASSANDRA-21089
@netudima netudima force-pushed the sep_thread_name-trunk branch from ca7568e to baf8857 Compare April 17, 2026 11:56
@netudima
Copy link
Copy Markdown
Contributor Author

Closed via 32162cf

@netudima netudima closed this Apr 17, 2026
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.

4 participants