Skip to content

Replace ACK_FAILURE with RESET #399

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

Merged
merged 4 commits into from
Aug 21, 2018
Merged

Conversation

lutovich
Copy link
Contributor

No description provided.

Both have equivalent semantics with regards to failure handing.
ACK_FAILURE will also be removed in the next Bolt protocol version.
@lutovich lutovich requested a review from ali-ince August 20, 2018 14:21
Later better describes the logic of the function. There is no sync
operation, only flushing of the queued messages/chunks. Responses
arrive asynchronously are de-chunked and forwarded for the
corresponding observers.
Copy link
Contributor

@ali-ince ali-ince left a comment

Choose a reason for hiding this comment

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

Changes look good for me. I only had one small comment.

}

const observer = {
_resetOnFailure() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wdyt about calling resetAndFlush instead, like resetAndFlush().finally(() => { /* clear failure */ })?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would definitely make the code a bit more concise but then failure will be cleared in a tick after the one that processes the RESET response. I think it might result in some queued callbacks to be failed unnecessarily.

@ali-ince ali-ince merged commit cb9ca48 into neo4j:1.7 Aug 21, 2018
@lutovich lutovich deleted the 1.7-ack-failure-to-reset branch August 21, 2018 10:19
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

Successfully merging this pull request may close these issues.

2 participants