Skip to content

Commit d01730b

Browse files
committed
comment
Signed-off-by: Attila Mészáros <[email protected]>
1 parent 82ea869 commit d01730b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/ReconciliationDispatcher.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ public R patchStatus(R resource, R originalResource) {
425425

426426
private R editStatus(R resource, R originalResource) {
427427
String resourceVersion = resource.getMetadata().getResourceVersion();
428+
// the cached resource should not be changed in any circumstances
429+
// that can lead to all kinds of race conditions.
428430
R clonedOriginal = cloner.clone(originalResource);
429431
try {
430432
clonedOriginal.getMetadata().setResourceVersion(null);

0 commit comments

Comments
 (0)