Skip to content

Another distributed race condition, #1571 - #1609

Merged
roji merged 3 commits into
npgsql:devfrom
fredericDelaporte:dtc
Jun 20, 2017
Merged

roji merged 3 commits into
npgsql:devfrom
fredericDelaporte:dtc

Conversation

@fredericDelaporte

Copy link
Copy Markdown
Contributor

As said in #1571, test demonstrating another distributed race condition with Npgsql.

@fredericDelaporte
fredericDelaporte force-pushed the dtc branch 2 times, most recently from e3eb373 to b633a2d Compare June 18, 2017 15:41

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changing a bit the pattern for reducing test code duplication

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just to check where this one is inserted in the 2PC. It appears, anywhere after the first phase: can occurs before second phase, concurrently to it, or after, varying from one test run to the other. Sometimes it is even on the same thread than a second phase (obviously not occurring concurrently those times).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

More logs in order to detect more easily thing occurring concurrently. (Adding the thread number is an indication too, but who knows if those threads are launched concurrently or one after another with some synchronization mechanism?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It appears I had messed them up again in the previous PR, sorry...

@roji

roji commented Jun 19, 2017

Copy link
Copy Markdown
Member

@fredericDelaporte thanks for this.

However, now that we have official confirmation that the 2nd phase is asynchronous, I'm wondering if it still makes sense to have AssertEventQueueCoherent - your explicit tests are failing because we see in "incoherent" sequence of events, but we now know that this sequence is in fact the expected behavior... Shouldn't remove this check?

@roji

roji commented Jun 19, 2017

Copy link
Copy Markdown
Member

BTW the same is probably true of the check that data has been committed to the table.

Ideally, we should:

What do you think? If you agree, do you want to amend your PR?

@fredericDelaporte

Copy link
Copy Markdown
Contributor Author

Yes those checks are no more really relevant. It should no more cause a failure, going to amend.

@fredericDelaporte

Copy link
Copy Markdown
Contributor Author

Rebased, and changed as written above and in #1610 review.

@fredericDelaporte

Copy link
Copy Markdown
Contributor Author

Failure of the TransactionRace. This one is about checking the data is there after transaction. Maybe not much worth it. Either we should increase the sleep, or switch it back to explicit.

@roji
roji merged commit 0333fe0 into npgsql:dev Jun 20, 2017
@fredericDelaporte
fredericDelaporte deleted the dtc branch July 24, 2017 21:16
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