rezataroosheh commented on code in PR #13770:
URL: https://github.com/apache/ignite/pull/13770#discussion_r4755318484
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java:
##########
@@ -1734,16 +1735,22 @@ private CacheContinuousQueryEntry
transformToEntry(IgniteClosure<CacheEntryEvent
oldVal = null;
}
+ // The transformer result is not a cache value, so the keep binary
flag of the cache does not apply to it.
+ // Keep it binary only if the transformer returned a BinaryObject, as
on the local node.
+ boolean keepBinary = transVal instanceof BinaryObject;
Review Comment:
@zstan, I rechecked the current master (60c143083f): I put this PR's test
class on it, without the fix, and ran the whole class.
testNonBinaryResultArrivesAsIs receives one PersonId (the local key) and one
BinaryObjectImpl (the remote key), so with your `instanceof BinaryObject`
assert, the local PersonId would fail it on my side.
What I ran:
```
git fetch https://github.com/apache/ignite.git master pull/13770/head
git checkout --detach 60c143083f
git checkout 19cbfc00f3 --
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerKeepBinaryTest.java
```
Then I added this line in testNonBinaryResultArrivesAsIs, just before `for
(Object o : received)`:
```java
received.forEach(o -> System.out.println(">>> NonBinary received: " +
o.getClass().getName()));
```
```
./mvnw -pl modules/core -am test -DFORK_COUNT_SET_TO_1
-Dtest=CacheContinuousWithTransformerKeepBinaryTest
-Dsurefire.failIfNoSpecifiedTests=false
```
Output:
```
>>> NonBinary received:
org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousWithTransformerKeepBinaryTest$PersonId
>>> NonBinary received: org.apache.ignite.internal.binary.BinaryObjectImpl
```
```
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
4.069 s <<< FAILURE! -- in
org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousWithTransformerKeepBinaryTest
```
I agree with your rule: binary with withKeepBinary(), not binary without it.
If we can't find why our runs differ, I'll change the fix so the local event is
binary too. Which commit did you run on?
--
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]