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

Avoid and cope with exceptions on graph reload #11167

Merged
merged 3 commits into from Aug 24, 2023

Conversation

mstv
Copy link
Member

@mstv mstv commented Aug 21, 2023

Fixes #11166
Might fix #10957

Proposed changes

  • BackgroundUpdater.WrappedOperationAsync(): Avoid getting stuck on exception by adding try finally
  • RevisionGraph.IsRowCacheDirty(): Safer detection by adding an additional check; rename for clarity
  • Call RevisionGraph.CacheTo() from single context only

Screenshots

N/A

Test methodology

  • extensive runs of existing tests

Please do not squash merge


✒️ I contribute this code under The Developer Certificate of Origin.

@mstv mstv self-assigned this Aug 21, 2023
Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

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

+2

{
localOrderedRowCache = new List<RevisionGraphRow>(capacity: Math.Max(currentRowIndex, lastOrderedNodeIndex) + 1);
Copy link
Member

Choose a reason for hiding this comment

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

So currentRowIndex is always smaller than lastOrderedNodeIndex?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, this was a wrong shortcut. Reverted.

@mstv mstv merged commit ee58612 into gitextensions:master Aug 24, 2023
3 of 4 checks passed
@ghost ghost added this to the vNext milestone Aug 24, 2023
@mstv mstv deleted the fix/graph_reload branch August 24, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dictionary exception thrown by RevisionGraph.BuildOrderedRowCache() RevisionGrid denies refresh after error
3 participants