Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Fix user disconnects #2006

Merged
merged 3 commits into from
Jun 25, 2020
Merged

Fix user disconnects #2006

merged 3 commits into from
Jun 25, 2020

Conversation

jgrund
Copy link
Member

@jgrund jgrund commented Jun 23, 2020

In:

tokio::spawn(async move {
poll_fn(move |cx| dtx.poll_canceled(cx)).await;
drx.close();
user_disconnected(id, &state2).await;
});

We spawn a task to disconnect users. However, we move both the tx and rx
handles into the task and block on the tx being cancelled.

Due to this approach, we will not disconnect users and instead buffer
their handles.

Instead, we should use .retain when sending to users and remove the ones
that error.

Signed-off-by: Joe Grund jgrund@whamcloud.io


This change is Reviewable

@jgrund jgrund added this to the IML EX V2 milestone Jun 23, 2020
@jgrund jgrund requested a review from a team June 23, 2020 17:46
@jgrund jgrund self-assigned this Jun 23, 2020
@jgrund jgrund added the bug label Jun 23, 2020
ip1981
ip1981 previously approved these changes Jun 23, 2020
@jgrund jgrund requested a review from a team June 23, 2020 19:06
johnsonw
johnsonw previously approved these changes Jun 23, 2020
In: https://github.com/whamcloud/integrated-manager-for-lustre/blob/83d065653a55ee4c1a6068c1d024f02a02c73172/iml-warp-drive/src/users.rs#L54-L58

We spawn a task to disconnect users. However, we move both the tx and rx
handles into the task and block on the tx being cancelled.

Due to this approach, we will not disconnect users and instead buffer
their handles.

Instead, we should use .retain when sending to users and remove the ones
that error.

Signed-off-by: Joe Grund <jgrund@whamcloud.io>
@jgrund jgrund requested a review from johnsonw June 25, 2020 15:21
@jgrund
Copy link
Member Author

jgrund commented Jun 25, 2020

@jgrund jgrund merged commit 0bea990 into master Jun 25, 2020
@jgrund jgrund deleted the fix-disconnects branch June 25, 2020 22:57
jgrund added a commit that referenced this pull request Jun 29, 2020
In: https://github.com/whamcloud/integrated-manager-for-lustre/blob/83d065653a55ee4c1a6068c1d024f02a02c73172/iml-warp-drive/src/users.rs#L54-L58

We spawn a task to disconnect users. However, we move both the tx and rx
handles into the task and block on the tx being cancelled.

Due to this approach, we will not disconnect users and instead buffer
their handles.

Instead, we should use .retain when sending to users and remove the ones
that error.

Signed-off-by: Joe Grund <jgrund@whamcloud.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants