anton-vinogradov commented on code in PR #13095:
URL: https://github.com/apache/ignite/pull/13095#discussion_r3560000810


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/KeyCacheObjectImpl.java:
##########
@@ -108,19 +108,20 @@ public KeyCacheObjectImpl(Object val, byte[] valBytes, 
int part) {
 
     /** {@inheritDoc} */
     @Override public int hashCode() {
-        assert val != null;

Review Comment:
   It isn't, unfortunately: with assertions off (production) the control falls 
through to `IgniteUtils.hashCode(null)`, which silently returns `0` — an 
unresolved key would quietly land in the wrong hash bucket instead of failing. 
The exception also isn't just diagnostics: `GridCacheIoManager` catches 
`CacheObjectNotResolvedException` next to `BinaryObjectException` and routes it 
to `onClassError`, i.e. the regular per-message error handling. The contract 
(query row keys travel bytes-only and must arrive resolved) is pinned by 
`GridCacheQueryResponseUnmarshalTest`.



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