-
Notifications
You must be signed in to change notification settings - Fork 236
Obsolete resource handling for read-cache-after-write #3207
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
base: next
Are you sure you want to change the base?
Changes from all commits
65d8c0f
da70c5f
a390fe6
8ef46ad
18ee1c8
de8267d
a5631c5
c689711
5d7de15
9b49b9f
720b8ca
5421153
68861ab
6d0bfac
ffd050f
386e280
706d162
9e27114
71a7e10
771049d
66b9665
f834fb6
d7d484e
aefcbc6
46cd7ee
3069759
1415048
67ecebd
ec96713
6060af0
dd0e326
3f22f3e
3586c2d
b507acb
0685672
f850a83
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,9 +27,11 @@ | |
| import io.javaoperatorsdk.operator.processing.event.source.filter.OnAddFilter; | ||
| import io.javaoperatorsdk.operator.processing.event.source.filter.OnDeleteFilter; | ||
| import io.javaoperatorsdk.operator.processing.event.source.filter.OnUpdateFilter; | ||
| import io.javaoperatorsdk.operator.processing.event.source.informer.TemporaryResourceCache; | ||
|
|
||
| import static io.javaoperatorsdk.operator.api.reconciler.Constants.DEFAULT_COMPARABLE_RESOURCE_VERSION; | ||
| import static io.javaoperatorsdk.operator.api.reconciler.Constants.DEFAULT_FOLLOW_CONTROLLER_NAMESPACE_CHANGES; | ||
| import static io.javaoperatorsdk.operator.api.reconciler.Constants.DEFAULT_GHOST_RESOURCE_CHECK_INTERVAL_MILLIS; | ||
| import static io.javaoperatorsdk.operator.api.reconciler.Constants.NO_LONG_VALUE_SET; | ||
| import static io.javaoperatorsdk.operator.api.reconciler.Constants.NO_VALUE_SET; | ||
|
|
||
|
|
@@ -139,4 +141,13 @@ | |
| * @since 5.3.0 | ||
| */ | ||
| boolean comparableResourceVersions() default DEFAULT_COMPARABLE_RESOURCE_VERSION; | ||
|
|
||
| /** | ||
| * For read-cache-after-write consistency there are some corner cases where we need to check the | ||
| * caches see {@link TemporaryResourceCache} periodically. This is the period in milliseconds. | ||
| * Applicable only if {@link #comparableResourceVersions()} is true. | ||
| * | ||
|
Comment on lines
+146
to
+149
|
||
| * @since 5.3.0 | ||
| */ | ||
| long ghostResourceCacheCheckInterval() default DEFAULT_GHOST_RESOURCE_CHECK_INTERVAL_MILLIS; | ||
| } | ||
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.
scheduledExecutorServiceis initialized withExecutors.newScheduledThreadPool(0), which creates a scheduler with 0 core threads; scheduled tasks won’t run. This also isn’t included instop()shutdown, so it would leak threads once fixed. Use a scheduler with at least 1 thread (or a shared scheduler) and ensure it’s shut down instop()alongside the other executors.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 not true.