[#2272] morph: Do not subscribe to events without listening #196

Merged
fyrchik merged 1 commit from fix/fixing-fix into master 2023-04-03 08:42:43 +00:00
Contributor

Simple commit cherry-pick from the https://github.com/nspcc-dev/neofs-node/pull/2272. I do not know why it has not been added to that repo yet. The situation may require additional attention @fyrchik.

Closes #194.

Simple commit cherry-pick from the https://github.com/nspcc-dev/neofs-node/pull/2272. I do not know why it has not been added to that repo yet. The situation may require additional attention @fyrchik. Closes #194.
carpawell self-assigned this 2023-03-31 19:34:08 +00:00
carpawell added 1 commit 2023-03-31 19:34:09 +00:00
[#2272] morph: Do not subscribe to events without listening
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
763dee4d60
It led to a neo-go dead-lock in the `subscriber` component. Subscribing to
notifications is the same RPC as any others, so it could also be blocked
forever if no async listening (reading the notification channel) routine
exists. If a number of subscriptions is big enough (or a caller is lucky
enough) subscribing loop might have not finished subscribing before the
first notification is received and then: subscribing RPC is blocked by
received notification (non)handling and listening notifications routine is
blocked by not finished subscription loop.
That commit starts listening notification channel _before_ any subscription
actions.

Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
carpawell requested review from storage-core-developers 2023-03-31 19:34:26 +00:00
carpawell requested review from storage-core-committers 2023-03-31 19:34:27 +00:00
acid-ant approved these changes 2023-04-03 07:29:09 +00:00
dstepanov-yadro approved these changes 2023-04-03 08:33:55 +00:00
fyrchik merged commit a69c6d1ec9 into master 2023-04-03 08:42:43 +00:00
fyrchik deleted branch fix/fixing-fix 2023-04-03 08:42:43 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#196
No description provided.