Copilot commented on code in PR #13215:
URL: https://github.com/apache/ignite/pull/13215#discussion_r3378295643
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java:
##########
@@ -34,61 +34,53 @@ public class CacheOperationContext implements Serializable {
/** */
private static final long serialVersionUID = 0L;
- /** Skip store. */
+ /** */
+ private static final CacheOperationContext INSTANCE = new
Builder().build();
+
+ /** Skip store flag. */
@GridToStringInclude
private final boolean skipStore;
- /** Skip store. */
+ /** Skip read through flag. */
@GridToStringInclude
private final boolean skipReadThrough;
/** No retries flag. */
@GridToStringInclude
private final boolean noRetries;
- /** */
+ /** Recovery flag. */
private final boolean recovery;
- /** Read-repair strategy. */
- private final ReadRepairStrategy readRepairStrategy;
+ /** Read-repair strategy.*/
+ private final @Nullable ReadRepairStrategy readRepairStrategy;
/** Keep binary flag. */
private final boolean keepBinary;
/** Expiry policy. */
- private final ExpiryPolicy expiryPlc;
+ private final @Nullable ExpiryPolicy expiryPlc;
/** Data center Id. */
- private final Byte dataCenterId;
+ private final @Nullable Byte dataCenterId;
/** Application attributes. */
- private final Map<String, String> appAttrs;
+ private final @Nullable Map<String, String> appAttrs;
- /**
- * Constructor with default values.
- */
- public CacheOperationContext() {
- skipStore = false;
- skipReadThrough = false;
- keepBinary = false;
- expiryPlc = null;
- noRetries = false;
- recovery = false;
- readRepairStrategy = null;
- dataCenterId = null;
- appAttrs = null;
- }
+ /** Calcite engine call flag. */
+ private final boolean calciteEngineCall;
/**
- * @param skipStore Skip store flag.
- * @param skipReadThrough Skip read-through cache store flag.
- * @param keepBinary Keep binary flag.
- * @param expiryPlc Expiry policy.
- * @param dataCenterId Data center id.
+ * @param skipStore Skip store flag.
+ * @param skipReadThrough Skip read-through cache store flag.
+ * @param keepBinary Keep binary flag.
+ * @param expiryPlc Expiry policy.
+ * @param dataCenterId Data center id.
Review Comment:
The constructor Javadoc parameter list is missing `noRetries` and
`recovery`, and the documented order no longer matches the actual parameter
order. This makes the comment misleading for future maintenance.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java:
##########
@@ -1426,6 +1429,7 @@ public final IgniteTxEntry addEntry(GridCacheOperation op,
drVer,
skipStore,
skipReadThrough,
+ calciteOpCall,
keepBinary,
Review Comment:
`calciteOpCall` is passed when creating a new `IgniteTxEntry`, but when an
existing entry is reused (`old != null`) the flag is never updated. This can
leave `txEntry.calciteOpCall()` incorrect for subsequent processing (e.g.,
binary unwrapping decisions). Consider setting the flag on the resulting
`txEntry` after the `if/else` so it is applied consistently for both code paths.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]