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

Only destroy matching sessions #2105

Merged
merged 1 commit into from
Jul 28, 2020
Merged

Only destroy matching sessions #2105

merged 1 commit into from
Jul 28, 2020

Conversation

jgrund
Copy link
Member

@jgrund jgrund commented Jul 27, 2020

If the iml-agent gets a SESSION_DESTROY message, it will destroy the
session with a matching plugin name, even if the session id does not
match.

This could lead to the wrong session being destroyed.

Check if the currently held session id matches the one to be destroyed.
If so, destroy it, if not it's a noop.

In addition, Remove the SessionInfo struct and replace Seq with
AtomicU64. This allows us to drop a Mutex, as AtomicU64 is lockless
and threadsafe.

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


This change is Reviewable

If the iml-agent gets a `SESSION_DESTROY` message, it will destroy the
session with a matching plugin name, even if the session id does not
match.

This could lead to the wrong session being destroyed.

Check if the currently held session id matches the one to be destroyed.
If so, destroy it, if not it's a noop.

In addition, Remove the `SessionInfo` struct and replace `Seq` with
`AtomicU64`. This allows us to drop a Mutex, as `AtomicU64` is lockless
and threadsafe.

Signed-off-by: Joe Grund <jgrund@whamcloud.io>
@jgrund jgrund added the bug label Jul 27, 2020
@jgrund jgrund self-assigned this Jul 27, 2020
@jgrund jgrund marked this pull request as ready for review July 27, 2020 20:33
@jgrund jgrund requested a review from a team July 27, 2020 20:33
@jgrund jgrund requested a review from a team July 27, 2020 21:19
Copy link
Contributor

@mkpankov mkpankov left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 7 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jgrund)

@jgrund jgrund merged commit aa6f5e2 into master Jul 28, 2020
@jgrund jgrund deleted the destroy-valid-sessions branch July 28, 2020 13:04
beevans pushed a commit to beevans/integrated-manager-for-lustre that referenced this pull request Aug 6, 2020
If the iml-agent gets a `SESSION_DESTROY` message, it will destroy the
session with a matching plugin name, even if the session id does not
match.

This could lead to the wrong session being destroyed.

Check if the currently held session id matches the one to be destroyed.
If so, destroy it, if not it's a noop.

In addition, Remove the `SessionInfo` struct and replace `Seq` with
`AtomicU64`. This allows us to drop a Mutex, as `AtomicU64` is lockless
and threadsafe.

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.

4 participants