Permalink
Browse files

New features and bug fixes:

- 'gvfs prefetch' can now hydrate files as it downloads their blobs
- Added a new 'gvfs service' verb for interacting with the GVFS.Service to mount/unmount all repos
- Reduced the perf overhead of GvFlt notifications for handle creation
- Treat 'git stage' the same as 'git add'
- Gather object and packfile counts in 'gvfs diagnose' to help with perf investigations
  • Loading branch information...
sanoursa committed Nov 14, 2017
1 parent ed04790 commit b07e554db151178fb397e51974d76465a13af017
Showing with 2,385 additions and 783 deletions.
  1. +1 −1 GVFS/FastFetch/CheckoutFetchHelper.cs
  2. +1 −0 GVFS/FastFetch/FastFetch.csproj
  3. +45 −20 GVFS/FastFetch/FetchHelper.cs
  4. +1 −1 GVFS/FastFetch/Git/GitIndexGenerator.cs
  5. +22 −20 GVFS/FastFetch/Jobs/BatchObjectDownloadJob.cs
  6. +1 −1 GVFS/FastFetch/Jobs/CheckoutJob.cs
  7. +0 −1 GVFS/FastFetch/Jobs/Data/BlobDownloadRequest.cs
  8. +1 −7 GVFS/FastFetch/Jobs/Data/IndexPackRequest.cs
  9. +8 −8 GVFS/FastFetch/Jobs/FindMissingBlobsJob.cs
  10. +4 −4 GVFS/FastFetch/Jobs/IndexPackJob.cs
  11. +3 −1 GVFS/FastFetch/Jobs/Job.cs
  12. +118 −0 GVFS/FastFetch/Jobs/ReadFilesJob.cs
  13. +2 −1 GVFS/GVFS.Common/GVFSConstants.cs
  14. +1 −13 GVFS/GVFS.Common/Git/GVFSGitObjects.cs
  15. +4 −5 GVFS/GVFS.Common/Git/GitObjects.cs
  16. +41 −5 GVFS/GVFS.Common/GitCommandLineParser.cs
  17. +1 −0 GVFS/GVFS.Common/Http/CacheServerInfo.cs
  18. +6 −8 GVFS/GVFS.Common/Http/GitObjectsHttpRequestor.cs
  19. +1 −0 GVFS/GVFS.Common/Http/HttpRequestor.cs
  20. +2 −2 GVFS/GVFS.Common/LibGit2RepoPool.cs
  21. +26 −0 GVFS/GVFS.Common/NamedPipes/NamedPipeMessages.cs
  22. +5 −10 GVFS/GVFS.Common/NativeMethods.cs
  23. +3 −0 GVFS/GVFS.FunctionalTests/GVFS.FunctionalTests.csproj
  24. +4 −8 GVFS/GVFS.FunctionalTests/GVFSTestConfig.cs
  25. +4 −1 GVFS/GVFS.FunctionalTests/Program.cs
  26. +1 −1 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CloneTests.cs
  27. +28 −15 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DehydrateTests.cs
  28. +1 −1 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs
  29. +1 −1 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/WorkingDirectoryTests.cs
  30. +78 −13 GVFS/GVFS.FunctionalTests/Tests/FastFetchTests.cs
  31. +54 −0 GVFS/GVFS.FunctionalTests/Tests/GitCommands/AddStageTests.cs
  32. +39 −0 GVFS/GVFS.FunctionalTests/Tests/GitCommands/CherryPickConflictTests.cs
  33. +48 −13 GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs
  34. +15 −1 GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitRepoTests.cs
  35. +45 −0 GVFS/GVFS.FunctionalTests/Tests/GitCommands/MergeConflictTests.cs
  36. +10 −0 GVFS/GVFS.FunctionalTests/Tests/GitCommands/RebaseConflictTests.cs
  37. +99 −0 GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ServiceVerbTests.cs
  38. +12 −32 GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs
  39. +33 −0 GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/TestsWithMultiEnlistment.cs
  40. +2 −2 GVFS/GVFS.FunctionalTests/Tools/ControlGitRepo.cs
  41. +1 −1 GVFS/GVFS.FunctionalTests/Tools/GVFSFunctionalTestEnlistment.cs
  42. +9 −0 GVFS/GVFS.FunctionalTests/Tools/GVFSProcess.cs
  43. +17 −4 GVFS/GVFS.FunctionalTests/Tools/GitHelpers.cs
  44. +57 −22 GVFS/GVFS.GVFlt/DotGit/GitIndexProjection.cs
  45. +102 −92 GVFS/GVFS.GVFlt/GVFltCallbacks.cs
  46. +91 −12 GVFS/GVFS.GvFltWrapper/CallbackDelegates.h
  47. +1 −1 GVFS/GVFS.GvFltWrapper/GvFlt.props
  48. +2 −4 GVFS/GVFS.GvFltWrapper/HResult.h
  49. +57 −10 GVFS/GVFS.GvFltWrapper/IVirtualizationInstance.h
  50. +44 −3 GVFS/GVFS.GvFltWrapper/NotificationType.h
  51. +2 −2 GVFS/GVFS.GvFltWrapper/NtStatus.h
  52. +41 −1 GVFS/GVFS.GvFltWrapper/UpdateFailureCause.h
  53. +33 −1 GVFS/GVFS.GvFltWrapper/UpdateType.h
  54. +4 −0 GVFS/GVFS.GvFltWrapper/Utils.h
  55. +125 −26 GVFS/GVFS.GvFltWrapper/VirtualizationInstance.cpp
  56. +62 −12 GVFS/GVFS.GvFltWrapper/VirtualizationInstance.h
  57. +1 −1 GVFS/GVFS.GvFltWrapper/packages.config
  58. +8 −9 GVFS/GVFS.Mount/InProcessMount.cs
  59. +2 −0 GVFS/GVFS.Service/GVFS.Service.csproj
  60. +14 −0 GVFS/GVFS.Service/GvfsService.cs
  61. +8 −12 GVFS/GVFS.Service/Handlers/AttachGvFltHandler.cs
  62. +6 −10 GVFS/GVFS.Service/Handlers/ExcludeFromAntiVirusHandler.cs
  63. +48 −0 GVFS/GVFS.Service/Handlers/GetActiveRepoListHandler.cs
  64. +16 −0 GVFS/GVFS.Service/Handlers/MessageHandler.cs
  65. +4 −11 GVFS/GVFS.Service/Handlers/RegisterRepoHandler.cs
  66. +9 −12 GVFS/GVFS.Service/Handlers/UnregisterRepoHandler.cs
  67. +25 −6 GVFS/GVFS.Service/RepoRegistry.cs
  68. +10 −0 GVFS/GVFS.UnitTests/Common/CacheServerResolverTests.cs
  69. +42 −9 GVFS/GVFS.UnitTests/Common/GitCommandLineParserTests.cs
  70. +0 −22 GVFS/GVFS.UnitTests/GVFlt/GVFltCallbacksTests.cs
  71. +3 −4 GVFS/GVFS.UnitTests/Git/GVFSGitObjectsTests.cs
  72. +1 −3 GVFS/GVFS.UnitTests/Mock/Git/MockBatchHttpGitObjects.cs
  73. +1 −2 GVFS/GVFS.UnitTests/Mock/Git/MockGVFSGitObjects.cs
  74. +1 −3 GVFS/GVFS.UnitTests/Mock/Git/MockHttpGitObjects.cs
  75. +6 −2 GVFS/GVFS.UnitTests/Mock/GvFlt/MockVirtualizationInstance.cs
  76. +0 −245 GVFS/GVFS/CommandLine/CloneHelper.cs
  77. +203 −3 GVFS/GVFS/CommandLine/CloneVerb.cs
  78. +72 −10 GVFS/GVFS/CommandLine/DehydrateVerb.cs
  79. +88 −2 GVFS/GVFS/CommandLine/DiagnoseVerb.cs
  80. +58 −1 GVFS/GVFS/CommandLine/GVFSVerb.cs
  81. +39 −12 GVFS/GVFS/CommandLine/LogVerb.cs
  82. +48 −6 GVFS/GVFS/CommandLine/PrefetchVerb.cs
  83. +1 −1 GVFS/GVFS/CommandLine/RepairVerb.cs
  84. +234 −0 GVFS/GVFS/CommandLine/ServiceVerb.cs
  85. +3 −1 GVFS/GVFS/CommandLine/UnmountVerb.cs
  86. +1 −1 GVFS/GVFS/GVFS.csproj
  87. +13 −7 GVFS/GVFS/Program.cs
  88. +1 −1 Readme.md
@@ -68,7 +68,7 @@ public override void FastFetch(string branchOrCommit, bool isBranch)
// Checkout diff output => FindMissingBlobs => BatchDownload => IndexPack => Checkout available blobs
CheckoutJob checkout = new CheckoutJob(this.checkoutThreadCount, this.FolderList, commitToFetch, this.Tracer, this.Enlistment);
FindMissingBlobsJob blobFinder = new FindMissingBlobsJob(this.SearchThreadCount, checkout.RequiredBlobs, checkout.AvailableBlobShas, this.Tracer, this.Enlistment);
BatchObjectDownloadJob downloader = new BatchObjectDownloadJob(this.DownloadThreadCount, this.ChunkSize, blobFinder.DownloadQueue, checkout.AvailableBlobShas, this.Tracer, this.Enlistment, this.ObjectRequestor, this.GitObjects);
BatchObjectDownloadJob downloader = new BatchObjectDownloadJob(this.DownloadThreadCount, this.ChunkSize, blobFinder.MissingBlobs, checkout.AvailableBlobShas, this.Tracer, this.Enlistment, this.ObjectRequestor, this.GitObjects);
IndexPackJob packIndexer = new IndexPackJob(this.IndexThreadCount, downloader.AvailablePacks, checkout.AvailableBlobShas, this.Tracer, this.GitObjects);
// Start pipeline
@@ -74,6 +74,7 @@
<Compile Include="Git\FastFetchLibGit2Repo.cs" />
<Compile Include="Git\GitIndexGenerator.cs" />
<Compile Include="HashingStream.cs" />
<Compile Include="Jobs\ReadFilesJob.cs" />
<Compile Include="WorkingTree.cs" />
<Compile Include="GitEnlistment.cs" />
<Compile Include="Git\DiffHelper.cs" />
@@ -10,6 +10,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
namespace FastFetch
{
@@ -30,7 +31,6 @@ public class FetchHelper
protected readonly bool SkipConfigUpdate;
private const string AreaPath = nameof(FetchHelper);
private const int CommitDepth = 1;
public FetchHelper(
ITracer tracer,
@@ -132,15 +132,24 @@ public static bool TryLoadFileList(Enlistment enlistment, string filesInput, Lis
/// <param name="branchOrCommit">A specific branch to filter for, or null for all branches returned from info/refs</param>
public virtual void FastFetch(string branchOrCommit, bool isBranch)
{
int matchedBlobs;
int downloadedBlobs;
this.FastFetchWithStats(branchOrCommit, isBranch, out matchedBlobs, out downloadedBlobs);
int matchedBlobCount;
int downloadedBlobCount;
int readFileCount;
this.FastFetchWithStats(branchOrCommit, isBranch, false, out matchedBlobCount, out downloadedBlobCount, out readFileCount);
}
public void FastFetchWithStats(string branchOrCommit, bool isBranch, out int matchedBlobs, out int downloadedBlobs)
public void FastFetchWithStats(
string branchOrCommit,
bool isBranch,
bool readFilesAfterDownload,
out int matchedBlobCount,
out int downloadedBlobCount,
out int readFileCount)
{
matchedBlobs = 0;
downloadedBlobs = 0;
matchedBlobCount = 0;
downloadedBlobCount = 0;
readFileCount = 0;
if (string.IsNullOrWhiteSpace(branchOrCommit))
{
@@ -169,16 +178,13 @@ public void FastFetchWithStats(string branchOrCommit, bool isBranch, out int mat
}
this.DownloadMissingCommit(commitToFetch, this.GitObjects);
// Dummy output queue since we don't need to checkout available blobs
BlockingCollection<string> availableBlobs = new BlockingCollection<string>();
// Configure pipeline
// LsTreeHelper output => FindMissingBlobs => BatchDownload => IndexPack
string shallowFile = Path.Combine(this.Enlistment.WorkingDirectoryRoot, GVFSConstants.DotGit.Shallow);
string previousCommit = null;
// Use the shallow file to find a recent commit to diff against to try and reduce the number of SHAs to check
DiffHelper blobEnumerator = new DiffHelper(this.Tracer, this.Enlistment, this.FileList, this.FolderList);
if (File.Exists(shallowFile))
@@ -192,21 +198,32 @@ public void FastFetchWithStats(string branchOrCommit, bool isBranch, out int mat
}
}
blobEnumerator.PerformDiff(previousCommit, commitToFetch);
this.HasFailures |= blobEnumerator.HasFailures;
new Thread(
() =>
{
blobEnumerator.PerformDiff(previousCommit, commitToFetch);
this.HasFailures |= blobEnumerator.HasFailures;
}).Start();
BlockingCollection<string> availableBlobs = new BlockingCollection<string>();
FindMissingBlobsJob blobFinder = new FindMissingBlobsJob(this.SearchThreadCount, blobEnumerator.RequiredBlobs, availableBlobs, this.Tracer, this.Enlistment);
BatchObjectDownloadJob downloader = new BatchObjectDownloadJob(this.DownloadThreadCount, this.ChunkSize, blobFinder.DownloadQueue, availableBlobs, this.Tracer, this.Enlistment, this.ObjectRequestor, this.GitObjects);
BatchObjectDownloadJob downloader = new BatchObjectDownloadJob(this.DownloadThreadCount, this.ChunkSize, blobFinder.MissingBlobs, availableBlobs, this.Tracer, this.Enlistment, this.ObjectRequestor, this.GitObjects);
IndexPackJob packIndexer = new IndexPackJob(this.IndexThreadCount, downloader.AvailablePacks, availableBlobs, this.Tracer, this.GitObjects);
ReadFilesJob readFiles = new ReadFilesJob(Environment.ProcessorCount * 2, blobEnumerator.FileAddOperations, availableBlobs, this.Tracer);
blobFinder.Start();
downloader.Start();
if (readFilesAfterDownload)
{
readFiles.Start();
}
// If indexing happens during searching, searching progressively gets slower, so wait on searching before indexing.
blobFinder.WaitForCompletion();
this.HasFailures |= blobFinder.HasFailures;
// Index regardless of failures, it'll shorten the next fetch.
packIndexer.Start();
downloader.WaitForCompletion();
@@ -215,8 +232,17 @@ public void FastFetchWithStats(string branchOrCommit, bool isBranch, out int mat
packIndexer.WaitForCompletion();
this.HasFailures |= packIndexer.HasFailures;
matchedBlobs = blobFinder.AvailableBlobCount + blobFinder.MissingBlobCount;
downloadedBlobs = blobFinder.MissingBlobCount;
availableBlobs.CompleteAdding();
if (readFilesAfterDownload)
{
readFiles.WaitForCompletion();
this.HasFailures |= readFiles.HasFailures;
}
matchedBlobCount = blobFinder.AvailableBlobCount + blobFinder.MissingBlobCount;
downloadedBlobCount = blobFinder.MissingBlobCount;
readFileCount = readFiles.ReadFileCount;
if (!this.SkipConfigUpdate && !this.HasFailures)
{
@@ -313,15 +339,14 @@ protected void DownloadMissingCommit(string commitSha, GitObjects gitObjects)
{
EventMetadata startMetadata = new EventMetadata();
startMetadata.Add("CommitSha", commitSha);
startMetadata.Add("CommitDepth", CommitDepth);
using (ITracer activity = this.Tracer.StartActivity("DownloadTrees", EventLevel.Informational, Keywords.Telemetry, startMetadata))
{
using (FastFetchLibGit2Repo repo = new FastFetchLibGit2Repo(this.Tracer, this.Enlistment.WorkingDirectoryRoot))
{
if (!repo.ObjectExists(commitSha))
{
if (!gitObjects.TryEnsureCommitIsLocal(commitSha, commitDepth: CommitDepth))
if (!gitObjects.TryDownloadCommit(commitSha))
{
EventMetadata metadata = new EventMetadata();
metadata.Add("ObjectsEndpointUrl", this.ObjectRequestor.CacheServer.ObjectsEndpointUrl);
@@ -108,7 +108,7 @@ private void WriteAllEntries(uint version, HashSet<string> sparseCheckoutEntries
uint lastStringLength = 0;
LsTreeEntry entry;
while (this.entryQueue.TryTake(out entry, millisecondsTimeout: -1))
while (this.entryQueue.TryTake(out entry, Timeout.Infinite))
{
bool skipWorkTree =
sparseCheckoutEntries != null &&
@@ -24,7 +24,7 @@ public class BatchObjectDownloadJob : Job
private static readonly TimeSpan HeartBeatPeriod = TimeSpan.FromSeconds(20);
private readonly BlockingAggregator<string, BlobDownloadRequest> inputQueue;
private readonly DownloadRequestAggregator downloadRequests;
private int activeDownloadCount;
@@ -39,7 +39,7 @@ public class BatchObjectDownloadJob : Job
public BatchObjectDownloadJob(
int maxParallel,
int chunkSize,
BlockingCollection<string> inputQueue,
BlockingCollection<string> missingBlobs,
BlockingCollection<string> availableBlobs,
ITracer tracer,
Enlistment enlistment,
@@ -49,7 +49,7 @@ public class BatchObjectDownloadJob : Job
{
this.tracer = tracer.StartActivity(AreaPath, EventLevel.Informational, Keywords.Telemetry, metadata: null);
this.inputQueue = new BlockingAggregator<string, BlobDownloadRequest>(inputQueue, chunkSize, objectIds => new BlobDownloadRequest(objectIds));
this.downloadRequests = new DownloadRequestAggregator(missingBlobs, chunkSize);
this.enlistment = enlistment;
this.objectRequestor = objectRequestor;
@@ -73,7 +73,7 @@ protected override void DoBeforeWork()
protected override void DoWork()
{
BlobDownloadRequest request;
while (this.inputQueue.TryTake(out request))
while (this.downloadRequests.TryTake(out request))
{
Interlocked.Increment(ref this.activeDownloadCount);
@@ -89,7 +89,6 @@ protected override void DoWork()
HashSet<string> successfulDownloads = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.InvocationResult result = this.objectRequestor.TryDownloadObjects(
() => request.ObjectIds.Except(successfulDownloads),
commitDepth: 1,
onSuccess: (tryCount, response) => this.WriteObjectOrPack(request, tryCount, response, successfulDownloads),
onFailure: RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.StandardErrorHandler(activity, request.PackId, DownloadAreaPath),
preferBatchedLooseObjects: true);
@@ -199,42 +198,45 @@ private void EmitHeartbeat(object state)
this.tracer.RelatedEvent(EventLevel.Verbose, "DownloadHeartbeat", metadata);
}
private class BlockingAggregator<InputType, OutputType>
private class DownloadRequestAggregator
{
private BlockingCollection<InputType> inputQueue;
private BlockingCollection<string> missingBlobs;
private int chunkSize;
private Func<List<InputType>, OutputType> factory;
public BlockingAggregator(BlockingCollection<InputType> input, int chunkSize, Func<List<InputType>, OutputType> factory)
public DownloadRequestAggregator(BlockingCollection<string> missingBlobs, int chunkSize)
{
this.inputQueue = input;
this.missingBlobs = missingBlobs;
this.chunkSize = chunkSize;
this.factory = factory;
}
public bool TryTake(out OutputType output)
public bool TryTake(out BlobDownloadRequest request)
{
List<InputType> intermediary = new List<InputType>();
List<string> blobsInChunk = new List<string>();
for (int i = 0; i < this.chunkSize; ++i)
{
InputType data;
if (this.inputQueue.TryTake(out data, millisecondsTimeout: -1))
// Only wait a short while for new work to show up, otherwise go ahead and download what we have accumulated so far
const int TimeoutMs = 100;
string blobId;
if (this.missingBlobs.TryTake(out blobId, TimeoutMs))
{
intermediary.Add(data);
blobsInChunk.Add(blobId);
}
else
else if (blobsInChunk.Count > 0 ||
this.missingBlobs.IsAddingCompleted)
{
break;
}
}
if (intermediary.Any())
if (blobsInChunk.Count > 0)
{
output = this.factory(intermediary);
request = new BlobDownloadRequest(blobsInChunk);
return true;
}
output = default(OutputType);
request = null;
return false;
}
}
@@ -282,7 +282,7 @@ private void HandleAllFileAddOperations()
using (FastFetchLibGit2Repo repo = new FastFetchLibGit2Repo(this.tracer, this.enlistment.WorkingDirectoryRoot))
{
string availableBlob;
while (this.AvailableBlobShas.TryTake(out availableBlob, millisecondsTimeout: -1))
while (this.AvailableBlobShas.TryTake(out availableBlob, Timeout.Infinite))
{
if (this.HasFailures)
{
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace FastFetch.Jobs.Data
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FastFetch.Jobs.Data
namespace FastFetch.Jobs.Data
{
public class IndexPackRequest
{
@@ -20,28 +20,28 @@ public class FindMissingBlobsJob : Job
private int missingBlobCount;
private int availableBlobCount;
private BlockingCollection<string> inputQueue;
private BlockingCollection<string> requiredBlobs;
private ConcurrentHashSet<string> alreadyFoundBlobIds;
public FindMissingBlobsJob(
int maxParallel,
BlockingCollection<string> inputQueue,
BlockingCollection<string> requiredBlobs,
BlockingCollection<string> availableBlobs,
ITracer tracer,
Enlistment enlistment)
: base(maxParallel)
{
this.tracer = tracer.StartActivity(AreaPath, EventLevel.Informational, Keywords.Telemetry, metadata: null);
this.inputQueue = inputQueue;
this.requiredBlobs = requiredBlobs;
this.enlistment = enlistment;
this.alreadyFoundBlobIds = new ConcurrentHashSet<string>();
this.DownloadQueue = new BlockingCollection<string>();
this.MissingBlobs = new BlockingCollection<string>();
this.AvailableBlobs = availableBlobs;
}
public BlockingCollection<string> DownloadQueue { get; }
public BlockingCollection<string> MissingBlobs { get; }
public BlockingCollection<string> AvailableBlobs { get; }
public int MissingBlobCount
@@ -59,14 +59,14 @@ protected override void DoWork()
string blobId;
using (FastFetchLibGit2Repo repo = new FastFetchLibGit2Repo(this.tracer, this.enlistment.WorkingDirectoryRoot))
{
while (this.inputQueue.TryTake(out blobId, Timeout.Infinite))
while (this.requiredBlobs.TryTake(out blobId, Timeout.Infinite))
{
if (this.alreadyFoundBlobIds.Add(blobId))
{
if (!repo.ObjectExists(blobId))
{
Interlocked.Increment(ref this.missingBlobCount);
this.DownloadQueue.Add(blobId);
this.MissingBlobs.Add(blobId);
}
else
{
@@ -80,7 +80,7 @@ protected override void DoWork()
protected override void DoAfterWork()
{
this.DownloadQueue.CompleteAdding();
this.MissingBlobs.CompleteAdding();
EventMetadata metadata = new EventMetadata();
metadata.Add("TotalMissingObjects", this.missingBlobCount);
@@ -12,7 +12,7 @@ public class IndexPackJob : Job
private const string AreaPath = "IndexPackJob";
private const string IndexPackAreaPath = "IndexPack";
private readonly BlockingCollection<IndexPackRequest> inputQueue;
private readonly BlockingCollection<IndexPackRequest> availablePacks;
private ITracer tracer;
private GitObjects gitObjects;
@@ -21,14 +21,14 @@ public class IndexPackJob : Job
public IndexPackJob(
int maxParallel,
BlockingCollection<IndexPackRequest> inputQueue,
BlockingCollection<IndexPackRequest> availablePacks,
BlockingCollection<string> availableBlobs,
ITracer tracer,
GitObjects gitObjects)
: base(maxParallel)
{
this.tracer = tracer.StartActivity(AreaPath, EventLevel.Informational, Keywords.Telemetry, metadata: null);
this.inputQueue = inputQueue;
this.availablePacks = availablePacks;
this.gitObjects = gitObjects;
this.AvailableBlobs = availableBlobs;
}
@@ -38,7 +38,7 @@ public class IndexPackJob : Job
protected override void DoWork()
{
IndexPackRequest request;
while (this.inputQueue.TryTake(out request, millisecondsTimeout: -1))
while (this.availablePacks.TryTake(out request, Timeout.Infinite))
{
EventMetadata metadata = new EventMetadata();
metadata.Add("PackId", request.DownloadRequest.PackId);
Oops, something went wrong.

0 comments on commit b07e554

Please sign in to comment.