Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple a bit of RenameTrackingTaggerProvider #31890

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasonmalinowski
Copy link
Member

This addresses a timing issue, where we would call UpdateTrackingSessionIfRenamable even the session had already been dismissed; this function implicitly assumed the session making the call was still active. Another helper function OnTrackingSessionUpdated which raises the session update events already had checks for this, but UpdateTrackingSessionIfRenamable bypassed that. The core of this fix is to remove the offending code in UpdateTrackingSessionIfRenameable and just have the TrackingSession call OnTrackingSessionUpdated. That's already done in many other places and is much simpler.

Upon further inspection of UpdateTrackingSessionIfRenamable it was also suspicious because it was having to grovel in the state of the active session to know if it should call CheckNewIdentifier. Moving that check into the function directly simplifies the code and decouples the types just a little bit.

This implicitly fixes #30661. The work of me understanding this code eventually led to us realizing that our move to JTF broke this and #31787 is probably necessary as a more general fix. I didn't want to lose this refactoring independent of that change, as to make this a bit cleaner the next time we need to make a change here.

@jasonmalinowski jasonmalinowski requested a review from a team as a code owner December 18, 2018 00:30
This addresses a timing issue, where we would call
UpdateTrackingSessionIfRenamable even the session had already been
dismissed; this function implicitly assumed the session making the
call was still active. Another helper function OnTrackingSessionUpdated
which raises the session update events already had checks for this,
but UpdateTrackingSessionIfRenamable bypassed that. The core of this
fix is to remove the offending code in UpdateTrackingSessionIfRenameable
and just have the TrackingSession call OnTrackingSessionUpdated. That's
already done in many other places and is much simpler.

Upon further inspection of UpdateTrackingSessionIfRenamable it was
also suspicious because it was having to grovel in the state of the
active session to know if it should call CheckNewIdentifier. Moving that
check into the function directly simplifies the code and decouples
the types just a little bit.
Base automatically changed from master to main March 3, 2021 23:51
@CyrusNajmabadi
Copy link
Member

@jasonmalinowski do we need this PR anymore? Can we close it out or bring it to completion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename tracking crashed
4 participants