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

Forbid null ack timeout #107653

Merged

Conversation

DaveCTurner
Copy link
Contributor

Today a cluster state update task with null ack timeout implies the
timeout is zero. This implicit behaviour is trappy, so this commit
forbids it.

Relates #107044

Today a cluster state update task with `null` ack timeout implies the
timeout is zero. This implicit behaviour is trappy, so this commit
forbids it.

Relates elastic#107044
@DaveCTurner DaveCTurner added >non-issue :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. v8.15.0 labels Apr 19, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Apr 19, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@@ -706,6 +706,7 @@ private static class TaskAckListener {
public void onCommit(TimeValue commitTime) {
TimeValue ackTimeout = contextPreservingAckListener.ackTimeout();
if (ackTimeout == null) {
assert false : "ackTimeout must always be present: " + contextPreservingAckListener;
ackTimeout = TimeValue.ZERO;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we forbid this when running without assertions as well?

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'm inclined to leave the production behaviour alone, for now at least. It's hard to be certain we've covered all the possible null values here by static analysis alone.

@DaveCTurner DaveCTurner added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Apr 22, 2024
@elasticsearchmachine elasticsearchmachine merged commit c0417b3 into elastic:main Apr 22, 2024
14 checks passed
@DaveCTurner DaveCTurner deleted the 2024/04/19/require-ackTimeout branch April 22, 2024 08:29
@DaveCTurner DaveCTurner restored the 2024/04/19/require-ackTimeout branch June 17, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. >non-issue Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants