-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes regression in Schema Watch led schema caching
Initialization of schema watch happens via the UnwrappableDatastore interface. Given the various proxies built around the datastore.Datastore interface, we came up with the notion of UnwrappableDatastore to be able to extract a particular type from the proxy chain. The way this is correctly done is by unwrapping in a loop until the type is found. This was unfortunately not done in the Schema Watch initialization logic, which assumed the position of the actual underlying datastore at a specific level. With recent changes in the datastore proxy chain, the assumed order became incorrect, and the initialization logic was unable to find an instance of the SchemaWatchableDatastore, even though it was there. As a consequence the logic fell back to JIT caching strategy. This replaces every bespoke piece of code handling the unwrapping logic with a new function that does this correctly and more conveniently, sparing duplicate code and being more concise.
- Loading branch information
1 parent
9baeea1
commit 8dca5cd
Showing
6 changed files
with
123 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters