Skip to content

Commit

Permalink
Fix page post-flush page fixup logic (#390)
Browse files Browse the repository at this point in the history
* Fix page post-flush page fixup logic if ReadOnlyAddress has moved past end address.

* update version
  • Loading branch information
badrishc committed May 16, 2024
1 parent 1467724 commit c0ae5a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .azure/pipelines/azure-pipelines-external-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 1) update the name: string below (line 6) -- this is the version for the nuget package (e.g. 1.0.0)
# 2) update \libs\host\GarnetServer.cs readonly string version (~line 45) -- NOTE - these two values need to be the same
######################################
name: 1.0.8
name: 1.0.9
trigger: none
resources:
repositories:
Expand Down
2 changes: 1 addition & 1 deletion libs/host/GarnetServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class GarnetServer : IDisposable
protected StoreWrapper storeWrapper;

// IMPORTANT: Keep the version in sync with .azure\pipelines\azure-pipelines-external-release.yml line ~6.
readonly string version = "1.0.8";
readonly string version = "1.0.9";

/// <summary>
/// Resp protocol version
Expand Down
7 changes: 5 additions & 2 deletions libs/storage/Tsavorite/cs/src/core/Allocator/AllocatorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2268,12 +2268,15 @@ protected void AsyncFlushPageToDeviceCallback(uint errorCode, uint numBytes, obj

if (result.fromAddress > startAddress)
startAddress = result.fromAddress;
if (result.untilAddress < endAddress)
endAddress = result.untilAddress;

var _readOnlyAddress = SafeReadOnlyAddress;
if (_readOnlyAddress > startAddress)
startAddress = _readOnlyAddress;
if (_readOnlyAddress > endAddress)
endAddress = _readOnlyAddress;

if (result.untilAddress < endAddress)
endAddress = result.untilAddress;
int flushWidth = (int)(endAddress - startAddress);

if (flushWidth > 0)
Expand Down

0 comments on commit c0ae5a9

Please sign in to comment.