-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Replace flush parameters with an enum of flush purposes #36342
Comments
Pinging @elastic/es-distributed |
Thanks for opening this issue Nhat. As an alternative in case this doesn't get consensus, we could reject the |
I think we should do this anyway as a first step. I am not sure we actually need the |
+1. I can't think of a reason for a user to do something else then "please flush now and I will wait until it completes" (which maps to |
+1. The documentation for
The docs are also out of sync with the code. The docs claim that the default for |
This change rejects an illegal combination of flush parameters where force is true, but wait_if_ongoing is false. This combination is trappy and should be forbidden. Closes #36342
If there's an ongoing flush triggered by the translog flush threshold, we may fail to execute a flush because waitIfOngoing is false by default. Relates to #36342
If there's an ongoing flush triggered by the translog flush threshold, we may fail to execute a flush because waitIfOngoing is false by default. Relates to #36342
This change rejects an illegal combination of flush parameters where force is true, but wait_if_ongoing is false. This combination is trappy and should be forbidden. Closes #36342
Today a flush request supports two parameters:
force
andwaitIfOngoing
. However, a combination of force=true and waitIfOngoing=false (default value) makes nonsense as that force flush will be ignored if there's an ongoing flush.@jpountz suggests replacing these two parameters with an enum of flush purposes:
TRY_FLUSH
equalsforce=false
andwaitIfOngoing=false
FLUSH_IF_CHANGES
equalsforce=false
andwaitIfOngoing=true
FORCE_FLUSH
equalsforce=true
andwaitIfOngoing=true
Note that this is a breaking change. Another option is always to execute a force flush regardless of the value of waitIfOngoing.
The text was updated successfully, but these errors were encountered: