Skip to content

Commit 5a502ca

Browse files
committed
Merged PR 700609: Remove UpdateStaleLocalLastAccessTimes
1 parent 9efe7e8 commit 5a502ca

File tree

5 files changed

+3
-19
lines changed

5 files changed

+3
-19
lines changed

Public/Src/Cache/ContentStore/Distributed/NuCache/LocalLocationStore.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,8 +2221,7 @@ public ContentResolver(LocalLocationStore localLocationStore, IDistributedMachin
22212221

22222222
bool foundDistributedEntry = _localLocationStore.TryGetContentLocations(context, hash, out var distributedEntry);
22232223

2224-
if (_localLocationStore.Configuration.UpdateStaleLocalLastAccessTimes
2225-
&& foundLocalInfo
2224+
if (foundLocalInfo
22262225
&& foundDistributedEntry
22272226
&& distributedEntry.LastAccessTimeUtc.ToDateTime() > localInfo.LastAccessTimeUtc)
22282227
{

Public/Src/Cache/ContentStore/Distributed/NuCache/LocalLocationStoreConfiguration.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,6 @@ public bool IsValidForLls()
293293
/// </summary>
294294
public bool UseFullEvictionSort { get; set; } = false;
295295

296-
/// <summary>
297-
/// Indicates whether local last access times should be updated if out of date with respect to distributed last access times
298-
/// </summary>
299-
public bool UpdateStaleLocalLastAccessTimes { get; set; } = false;
300-
301296
/// <summary>
302297
/// Amount of entries to compute evictability metric for in a single pass. The larger this is, the faster the
303298
/// candidate pool fills up, but also the slower it is to produce a candidate. Helps control how fast we need

Public/Src/Cache/ContentStore/DistributedTest/ContentLocation/LocalLocationStoreDistributedContentTests.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,15 +2506,12 @@ public Task SelfEvictionTests()
25062506
}
25072507

25082508
[Theory]
2509-
[InlineData(true)]
2510-
[InlineData(false)]
2511-
public async Task TestFullSortEviction(bool updateStaleLocalAges)
2509+
public async Task TestFullSortEviction()
25122510
{
25132511
ConfigureWithOneMaster(dcs =>
25142512
{
25152513
dcs.UseTieredDistributedEviction = true;
25162514
dcs.UseFullEvictionSort = true;
2517-
dcs.UpdateStaleLocalLastAccessTimes = updateStaleLocalAges;
25182515
});
25192516

25202517
var hashCount = 20_000;
@@ -2578,7 +2575,7 @@ await RunTestAsync(
25782575

25792576
llsEvictionPrecedence.Should().BeCloseTo(fullOrderPredecedence, 100, "Hash precedence should roughly match the precedence if hashes were all sorted");
25802577

2581-
if (iteration == 0 || !updateStaleLocalAges)
2578+
if (iteration == 0)
25822579
{
25832580
// Local age and distributed age should not match
25842581
info.LocalAge.Should().NotBe(info.Age);

Public/Src/Cache/DistributedCache.Host/Configuration/DistributedContentSettings.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,6 @@ public void DisableRedis()
290290
[DataMember]
291291
public bool UseFullEvictionSort { get; set; } = false;
292292

293-
/// <summary>
294-
/// Configures whether ages of content are updated when sorting during eviction
295-
/// </summary>
296-
[DataMember]
297-
public bool UpdateStaleLocalLastAccessTimes { get; set; } = false;
298-
299293
/// <summary>
300294
/// Configures whether to use new tiered eviction logic or not.
301295
/// </summary>

Public/Src/Cache/DistributedCache.Host/Service/Internal/DistributedContentStoreFactory.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ private LocalLocationStoreConfiguration CreateContentLocationStoreConfiguration(
183183
UseFullEvictionSort = _distributedSettings.UseFullEvictionSort,
184184
EvictionWindowSize = _distributedSettings.EvictionWindowSize,
185185
EvictionPoolSize = _distributedSettings.EvictionPoolSize,
186-
UpdateStaleLocalLastAccessTimes = _distributedSettings.UpdateStaleLocalLastAccessTimes,
187186
EvictionRemovalFraction = _distributedSettings.EvictionRemovalFraction,
188187
EvictionDiscardFraction = _distributedSettings.EvictionDiscardFraction,
189188
UseTieredDistributedEviction = _distributedSettings.UseTieredDistributedEviction,

0 commit comments

Comments
 (0)