Skip to content

Commit

Permalink
Upgrade FASTER dependency to v2.6.4 (#344)
Browse files Browse the repository at this point in the history
* initial commit

* added comment

* added readCopyOptions

* addressed PR feedback

* updated CheckpointVersionShift()

* updated Netherite version

* Update src/DurableTask.Netherite/StorageLayer/Faster/FasterStorageProvider.cs

* Update src/DurableTask.Netherite/DurableTask.Netherite.csproj

* update to FASTER v2.6.3

* update to FASTER 2.6.4

---------

Co-authored-by: Sebastian Burckhardt <[email protected]>
  • Loading branch information
bachuv and sebastianburckhardt authored Apr 22, 2024
1 parent 40a1f8c commit 6870713
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/DurableTask.Netherite/DurableTask.Netherite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
<PackageReference Include="Microsoft.Azure.EventHubs.Processor" Version="4.3.2" />
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="11.2.3" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.16.0" />
<PackageReference Include="Microsoft.FASTER.Core" Version="2.0.23" />
<PackageReference Include="Microsoft.Azure.DurableTask.Core" Version="2.15.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Microsoft.FASTER.Core" Version="2.6.4" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="System.Threading.Channels" Version="4.7.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public LogSettings GetStoreLogSettings(bool useSeparatePageBlobStorage, long upp
MutableFraction = tuningParameters?.StoreLogMutableFraction ?? 0.9,
SegmentSizeBits = segmentSizeBits,
PreallocateLog = false,
ReadFlags = ReadFlags.None,
ReadCopyOptions = default, // is overridden by the per-session configuration
ReadCacheSettings = null, // no read cache
MemorySizeBits = memorySizeBits,
};
Expand Down Expand Up @@ -886,7 +886,7 @@ async Task DeleteCheckpointDirectory(IEnumerable<string> blobsToDelete)

#region ILogCommitManager

void ILogCommitManager.Commit(long beginAddress, long untilAddress, byte[] commitMetadata, long commitNum)
void ILogCommitManager.Commit(long beginAddress, long untilAddress, byte[] commitMetadata, long commitNum, bool forceWriteMetadata)
{
try
{
Expand Down Expand Up @@ -1482,5 +1482,10 @@ await this.PerformWithRetriesAsync(
});
}
}

public void CheckpointVersionShift(long oldVersion, long newVersion)
{
// no-op
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,10 @@ public void OnRecovery(Guid indexToken, Guid logToken)

void IDisposable.Dispose()
=> this.localCheckpointManager.Dispose();

public void CheckpointVersionShift(long oldVersion, long newVersion)
{
// no-op
}
}
}
7 changes: 6 additions & 1 deletion src/DurableTask.Netherite/StorageLayer/Faster/FasterKV.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@ double GetElapsedCompactionMilliseconds()
ClientSession<Key, Value, EffectTracker, Output, object, IFunctions<Key, Value, EffectTracker, Output, object>> CreateASession(string id, bool isScan)
{
var functions = new Functions(this.partition, this, this.cacheTracker, isScan);
return this.fht.NewSession(functions, id, readFlags: (isScan ? ReadFlags.None : ReadFlags.CopyReadsToTail));

ReadCopyOptions readCopyOptions = isScan
? new ReadCopyOptions(ReadCopyFrom.None, ReadCopyTo.None)
: new ReadCopyOptions(ReadCopyFrom.AllImmutable, ReadCopyTo.MainLog);

return this.fht.NewSession(functions, id, default, readCopyOptions);
}

public IDisposable TrackTemporarySession(ClientSession<Key, Value, EffectTracker, Output, object, IFunctions<Key, Value, EffectTracker, Output, object>> session)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ async Task<bool> IStorageLayer.CreateTaskhubIfNotExistsAsync()
this.traceHelper.TraceProgress($"Using existing blob container at {this.cloudBlobContainer.Result.Uri}");
}


var taskHubParameters = new TaskhubParameters()
{
TaskhubName = this.settings.HubName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
Expand Down

0 comments on commit 6870713

Please sign in to comment.