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

Improve logging for lease management #723

Merged
merged 2 commits into from
May 5, 2022
Merged

Improve logging for lease management #723

merged 2 commits into from
May 5, 2022

Conversation

cgillum
Copy link
Member

@cgillum cgillum commented May 4, 2022

I was doing some manual testing of the lease management code to try and diagnose some issues we've been facing recently and found a few places where we could use some improvements. Here are the changes in this PR:

  • Add "lease type" fields to all the lease management logs for easier analysis
  • Fixes an ObjectDisposedException when restarting the task hub worker (reported by an internal DTFx user).
  • A small number of minor code cleanup changes

I found some more fundamental lease management issues as well, but I'll try to tackle those in a separate PR.

Fix app lease restart issue
Copy link
Collaborator

@sebastianburckhardt sebastianburckhardt left a comment

Choose a reason for hiding this comment

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

some minor questions, other than that this looks good to me.

Copy link
Collaborator

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

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

LGTM, although I'm not sure where the object-disposed exception was addressed.

@cgillum
Copy link
Member Author

cgillum commented May 5, 2022

@davidmrdavid thanks! The ObjectDisposedException was in AppLeaseManager, where we try to reuse an old starterTokenSource, which had been previously disposed. My change was to assign it to null as part of shutdown so that we'd reinitialize it on the subsequent startup.

@cgillum cgillum merged commit 84d75c5 into main May 5, 2022
@cgillum cgillum deleted the cgillum/lease-logging branch May 5, 2022 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dt.azurestorage DurableTask.AzureStorage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants