Skip to content

Bulk Helper: Actions params whitelist is missing if_seq_no and if_primary_term #1259

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

Closed
USSRLivesOn opened this issue May 27, 2020 · 2 comments

Comments

@USSRLivesOn
Copy link

USSRLivesOn commented May 27, 2020

Elasticsearch version (bin/elasticsearch --version):
7.4.2

elasticsearch-py version (elasticsearch.__versionstr__):
7.5.1, but as far as I can tell, bug is still in master.

Description of the problem including expected versus actual behavior:
The bulk helper should respect the if_seq_no and if_primary_term parameters in the action, but it does not. As far as I can tell, they're just ignored entirely because they're not included in the expand_action whitelist. They should be included in the whitelist.

Steps to reproduce:
Use the bulk helper with the if_seq_no and if_primary_term params. Notice that they don't actually get sent to the cluster.


Separately, it'd be really nice if the bulk helper didn't just silently ignore unrecognized attributes. If you're whitelisting the valid params, then I'd expect at least a warning logged that an unrecognized param was encountered. An error would be even better.

@sethmlarson
Copy link
Contributor

@USSRLivesOn This sounds like a good improvement, would you be willing to create the patch adding if_seq_no and if_primary_term to the list?

I also like the idea of having a warning for unrecognized parameters.

saket1205 added a commit to saket1205/elasticsearch-py that referenced this issue Jul 7, 2020
@sethmlarson
Copy link
Contributor

This issue has been resolved in #1387

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

No branches or pull requests

2 participants