- 
                Notifications
    
You must be signed in to change notification settings  - Fork 25.6k
 
Report outcome of data node's shard snapshot master update #123652
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
Report outcome of data node's shard snapshot master update #123652
Conversation
Closes ES-10991
| 
           Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)  | 
    
fdc0862    to
    f482392      
    Compare
  
    | localShard.getValue().getShardSnapshotResult(), | ||
| () -> null | ||
| (outcomeInfoString) -> localShard.getValue().updateStatusDescription( | ||
| Strings.format(""" | 
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 could theoretically grow without bound -- appending the previous status string. I figure it's unlikely to happen, since we'd stop once a remote call successfully updates the cluster state. We'd have to keep rolling over the master, and keep failing to get majority, or persistence in the blob store for serverless.
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.
Yeah could we impose a limit here just in case? Simply truncating the string if it exceeds 1000 characters or something?
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.
Updated 👍 I used substring: a bit wordy, let me know if there's some other/better standard way of doing it.
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.
LGTM hopefully this helps
Improves the information in the IndexShardSnapshotStatus's
statusDescription field to include the success/failure of the remote
call to the master node to update the shard snapshot state. This
allows us to see if there is a discrepancy between the state of the
data node and the master node.
Closes ES-10991