shishkovilja commented on code in PR #13095:
URL: https://github.com/apache/ignite/pull/13095#discussion_r3637910547


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java:
##########
@@ -1215,7 +1229,29 @@ private void processDhtTxPrepareRequest(final UUID 
nodeId, final GridDhtTxPrepar
                 if (nearTx != null)
                     res.nearEvicted(nearTx.evicted());
 
-                List<IgniteTxKey> writesCacheMissed = 
req.nearWritesCacheMissed();
+                List<IgniteTxKey> writesCacheMissed = new ArrayList<>();
+
+                Collection<IgniteTxEntry> writes = req.nearWrites();
+
+                for (Iterator<IgniteTxEntry> it = writes.iterator(); 
it.hasNext();) {
+                    IgniteTxEntry e = it.next();
+
+                    GridCacheContext<?, ?> cacheCtx = 
ctx.cacheContext(e.cacheId());
+
+                    // A missing cache or one recreated after the request was 
sent: report the key back as evicted,
+                    // so the near node drops its stale entry.
+                    if (cacheCtx == null

Review Comment:
   Thi logic differs from old one from 
`GridDhtTxPrepareRequest#finishUnmarshal`. Why?



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java:
##########
@@ -359,35 +324,38 @@ CacheObject oldValue() {
         return depInfo;
     }
 
-
     /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(CacheContinuousQueryEntry.class, this);
+    @Override public void marshal(Marshaller marsh) throws 
IgniteCheckedException {

Review Comment:
   Not a marhalling.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java:
##########
@@ -430,12 +432,21 @@ public IgniteInternalFuture<GridNearTxPrepareResponse> 
prepareNearTxLocal(
         IgniteTxEntry firstEntry;
 
         try {
-            IgniteTxEntry firstWrite = unmarshal(req.writes());
-            IgniteTxEntry firstRead = unmarshal(req.reads());
+            IgniteTxEntry firstWrite = initialize(req.writes(), 
req.topologyVersion());
+            IgniteTxEntry firstRead = initialize(req.reads(), 
req.topologyVersion());
 
             firstEntry = firstWrite != null ? firstWrite : firstRead;
         }
         catch (IgniteCheckedException e) {
+            try {
+                req.onClassError(e);

Review Comment:
   Can you explain it in more human frendly form and more briefly?



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java:
##########
@@ -359,35 +324,38 @@ CacheObject oldValue() {
         return depInfo;
     }
 
-
     /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(CacheContinuousQueryEntry.class, this);
+    @Override public void marshal(Marshaller marsh) throws 
IgniteCheckedException {
+        if (!isFiltered()) {
+            keyWire = key;
+            newValWire = newVal;
+            oldValWire = oldVal;
+        }
     }
 
     /** {@inheritDoc} */
-    @Override public void prepareMarshal(Marshaller marsh) throws 
IgniteCheckedException {
-        if (!isFiltered()) {
-            if (key != null)
-                keyBytes = marsh.marshal(key);
+    @Override public void unmarshal(Marshaller marsh, ClassLoader clsLdr) 
throws IgniteCheckedException {

Review Comment:
   Not an unmarhalling.



-- 
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]

Reply via email to