-
Notifications
You must be signed in to change notification settings - Fork 306
Add support for create actions in the node client #29
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
Conversation
- Adds validation to require `_id` for create actions (including for the http protocol)
@talevy I'd like to get the change in and honestly I think people expect the current behavior from The integration tests definitely do not behave that way though. As I have it, the |
@pickypg Any behavior that results in "drop on error" should be very loudly documented. Are you proposing that create-with-an-id-that-already-exists should result in a dropped event? |
@jordansissel Yes. In the logging use case, selecting this is very manual and it seems quite intentional. If you don't want it, then leaving it as "index" (default) would suffice. |
I wonder if we should make it more explicit, call it |
I'm fine with modifying it that way, but that means we have to further special case it for the non- |
@pickypg yeah, I'm less worried about the specific implementation details (special-casing) and more concerned with having an interface and terminology that is most-obvious (nobody will read docs to know what Elasticsearch's |
@jordansissel Fine by me. I'll find time to update the PR. Do you have any thoughts on how to appropriately test it? It's my lack of Ruby knowledge doing me in, but I'd like to see this make it in. |
@pickypg yep! We'll get someone helping you out with that this week or next. This should be doable for 1.5's timeline |
Thinking more outloud - Once we have @colinsurprenant's persistent-queue work merged as well as the dead-letter-queueing, we could just have this be "create" and a failure would dump into the DLQ. For 1.5, I think 'create_unless_exists' is what to do. For 2.0, we can add 'create' also but shunting errors to the DLQ. |
testing for failures requires changes in #2 to get in. |
…or both - "create_unless_exists" will require the ID, while "create" does not require it and effectively behaves identically to "index". - An error is raised if unknown actions are supplied
Closed in lieu of #39 |
_id
for create actions (including for the http protocol)Help: I don't know how to properly test for the error condition. The
"create action fails without _id"
test fails because I'm not testing it right, but I don't know how to properly catch the error.Note: #2 (retry on bulk failure) may need to special case failure to create (ignore it).
Closes #28