-
Notifications
You must be signed in to change notification settings - Fork 624
Use immutable Documents in MemoryRemoteDocumentCache #3225
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
Conversation
@@ -31,14 +33,14 @@ | |||
final class MemoryRemoteDocumentCache implements RemoteDocumentCache { | |||
|
|||
/** Underlying cache of documents and their read times. */ | |||
private ImmutableSortedMap<DocumentKey, MutableDocument> docs; | |||
private ImmutableSortedMap<DocumentKey, Document> docs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change.
Coverage ReportAffected SDKs
Test Logs
NotesHTML coverage reports can be produced locally with Head commit (23f2af6e) is created by Prow via merging commits: 7d86138 636d9c9. |
Binary Size ReportAffected SDKs
Test Logs
NotesHead commit (23f2af6e) is created by Prow via merging commits: 7d86138 636d9c9. |
@schmidt-sebastian: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This is a small refactor that makes it possible to ensure via compile-time checks that we never return a Document directly from the RemoteDocumentCache. Instead, we must call
clone()
.