Skip to content

rgw/amqp: fix race condition in AMQP unit test#30735

Merged
yuvalif merged 1 commit intoceph:masterfrom
yuvalif:fix_race_condition_in_amqp_test
Oct 10, 2019
Merged

rgw/amqp: fix race condition in AMQP unit test#30735
yuvalif merged 1 commit intoceph:masterfrom
yuvalif:fix_race_condition_in_amqp_test

Conversation

@yuvalif
Copy link
Contributor

@yuvalif yuvalif commented Oct 6, 2019

RGW/AMQP: fixing race condition in AMQP unit test

When connection object is deleted, all pending requests are nacked with "connection closed" code. Tests were fixed so that this does not race with the actual messages being acked or nacked. A specific tests was added to simulate this race condition.

Fixes: https://tracker.ceph.com/issues/42042
Signed-off-by: Yuval Lifshitz yuvalif@yahoo.com

@yuvalif yuvalif requested review from cbodley and tchaikov October 6, 2019 08:38
@tchaikov tchaikov changed the title rgw/amqp: fix issue #42042 rgw/amqp: fix race condition in AMQP unit test Oct 6, 2019
@yuvalif yuvalif added the DNM label Oct 7, 2019
@yuvalif yuvalif force-pushed the fix_race_condition_in_amqp_test branch from 0b33f90 to d4b7cd1 Compare October 7, 2019 12:55
@yuvalif yuvalif removed the DNM label Oct 7, 2019
@tchaikov
Copy link
Contributor

@yuvalif ping?

Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
@yuvalif yuvalif force-pushed the fix_race_condition_in_amqp_test branch from d4b7cd1 to 5934ef5 Compare October 10, 2019 08:05
@yuvalif yuvalif merged commit c286238 into ceph:master Oct 10, 2019
@yuvalif yuvalif deleted the fix_race_condition_in_amqp_test branch October 10, 2019 13:35
@smithfarm
Copy link
Contributor

smithfarm commented Oct 14, 2019

@yuvalif This looks great, except for one thing. I don't understand why the nice explanation in the PR description is not in the commit message?

The commit message is:

 rgw/amqp: fix race condition in AMQP unit test

Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>

and the PR description is:

RGW/AMQP: fixing race condition in AMQP unit test

When connection object is deleted, all pending requests are nacked with "connection
closed" code. Tests were fixed so that this does not race with the actual messages
being acked or nacked. A specific tests was added to simulate this race condition.

Fixes: https://tracker.ceph.com/issues/42042
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>

The information included in the PR description actually belongs in the commit message... Otherwise, it is not accessible when browsing the git history.

@tchaikov
Copy link
Contributor

@smithfarm thanks! thought it was in the commit message!

@yuvalif
Copy link
Contributor Author

yuvalif commented Oct 14, 2019

@yuvalif This looks great, except for one thing. I don't understand why the nice explanation in the PR description is not in the commit message?

The commit message is:

 rgw/amqp: fix race condition in AMQP unit test

Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>

and the PR description is:

RGW/AMQP: fixing race condition in AMQP unit test

When connection object is deleted, all pending requests are nacked with "connection
closed" code. Tests were fixed so that this does not race with the actual messages
being acked or nacked. A specific tests was added to simulate this race condition.

Fixes: https://tracker.ceph.com/issues/42042
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>

The information included in the PR description actually belongs in the commit message... Otherwise, it is not accessible when browsing the git history.

@smithfarm so far I though that commit messages should be one liners, and the more detailed description belongs in the PR's description. will make sure, from now on, the info is in the commit.

@smithfarm
Copy link
Contributor

Thanks, @yuvalif :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants