Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Compaction logging #510

Merged
merged 4 commits into from Nov 16, 2018
Merged

Add Compaction logging #510

merged 4 commits into from Nov 16, 2018

Conversation

JunTaoLuo
Copy link

@JunTaoLuo JunTaoLuo commented Nov 15, 2018

Reopening aspnet/Caching#441 in the right repo.

Adding logging to test out my theory on aspnet/Caching#429.

Also fixing a test for https://github.com/aspnet/AspNetCore-Internal/issues/1374.

@@ -553,7 +553,7 @@ public void AddAndReplaceEntries_AreThreadSafe()
var entrySize = random.Next(0, 5);
cache.Set(random.Next(0, 10), entrySize, new MemoryCacheEntryOptions { Size = entrySize });
}
}, cts.Token);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to pass the token since we check via cts.IsCancellationRequested inside the tasks. Alternatively we can catch the TaskCancelledException from WaitAll

@JunTaoLuo JunTaoLuo merged commit c3c9c55 into master Nov 16, 2018
@JunTaoLuo JunTaoLuo deleted the johluo/add-compaction-logging branch November 16, 2018 00:14
@poke
Copy link

poke commented Nov 17, 2018

Just out of curiosity: Why is the memory cache injecting a LoggerFactory and not directly an ILogger<MemoryCache>? Just to be able to use the NullLoggerFactory as a default?

natemcmaster pushed a commit that referenced this pull request Nov 21, 2018
…master

[automated] Merge branch 'release/2.2' => 'master'
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 11, 2020
* Add logging for compaction test

* Fix AddAndReplaceEntries_AreThreadSafe


Commit migrated from dotnet/extensions@c3c9c55
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 11, 2020
* Add logging for compaction test

* Fix AddAndReplaceEntries_AreThreadSafe


Commit migrated from dotnet/extensions@c3c9c55
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 27, 2020
* Add logging for compaction test

* Fix AddAndReplaceEntries_AreThreadSafe


Commit migrated from dotnet/extensions@c3c9c55
JunTaoLuo added a commit to dotnet/aspnetcore that referenced this pull request Nov 17, 2020
* Add logging for compaction test

* Fix AddAndReplaceEntries_AreThreadSafe
\n\nCommit migrated from dotnet/extensions@c3c9c55
@ghost ghost locked as resolved and limited conversation to collaborators May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants