Skip to content

Commit 4fabbb9

Browse files
authored
SF-3166b Avoid using cache when generating revision summaries (#3196)
1 parent 86ec028 commit 4fabbb9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/SIL.XForge.Scripture/Services/ParatextService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2121,7 +2121,9 @@ int chapter
21212121
foreach (HgRevision revision in revisionCollection)
21222122
{
21232123
// Get the revision summary to see if the book and chapter has changed
2124-
RevisionChangeInfo revisionSummary = revisionCollection.GetSummaryFor(revision);
2124+
// Note: revisionCollection.GetSummaryFor(revision) maintains a non-thread safe cache of the revision
2125+
// summaries, so we should just instantiate RevisionChangeInfo, as we will not need the cache.
2126+
RevisionChangeInfo revisionSummary = new RevisionChangeInfo(revisionCollection.VersionedText, revision);
21252127

21262128
// Skip the revision if this book is not modified
21272129
if (!revisionSummary.HasChangesInBook(bookNum))

0 commit comments

Comments
 (0)