Skip to content

Conversation

@pontusmelke
Copy link
Contributor

In the event of a reset the transaction should be completely closed and the
session should be ready to create new transactions without explicitly closing
any transactions.

In the event of a reset the transaction should be completely closed and the
session should be ready to create new transactions without explicitly closing
any transactions.
@zhenlineo
Copy link
Contributor

So the synchronized modifier is to enforce changes to currentTx in session are all sequential. I can hardly think of any simpler way to make it more thread-safe.

@zhenlineo zhenlineo self-assigned this Sep 20, 2016
Zhen added 2 commits September 21, 2016 23:53
…set, no more messages will be enqueued or flushed until the current sent ones has been synced.

Always ackFail
Given the following message senquence between server and client

C           S
RUN      -> FAIL, error e
PULL_ALL -> IGNORED
RESET    -> SUCC

In the previous PR, the error e could be thrown either after RESET or before RESET depending on if we called sync (receiveAll) after RESET or before RESET.
In this PR, by replacing receiveAll with receiveOne multiple times, we ensure that if the sesssion get interrupted, the error e is always immediately thrown before reset. Therefore we know we could mute akc_failure after a reset is sent, before a reply to this reset is received.
@technige technige merged commit d033d8b into neo4j:1.1 Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants