You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ilya Korol (Jira)" <ji...@apache.org> on 2021/06/15 08:40:00 UTC
[jira] [Resolved] (IGNITE-14898) IndexOutOfBoundException in
flusher selection logic in GridCacheWriteBehindStore
[ https://issues.apache.org/jira/browse/IGNITE-14898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ilya Korol resolved IGNITE-14898.
---------------------------------
Resolution: Duplicate
> IndexOutOfBoundException in flusher selection logic in GridCacheWriteBehindStore
> --------------------------------------------------------------------------------
>
> Key: IGNITE-14898
> URL: https://issues.apache.org/jira/browse/IGNITE-14898
> Project: Ignite
> Issue Type: Bug
> Components: general
> Affects Versions: 2.10
> Reporter: Ilya Korol
> Assignee: Ilya Korol
> Priority: Major
>
> There i a bug in GridCacheWriteBehindStore method for selecting which flusher should be used for current data write by specified key:
> {code:java}
> /**
> * Return flusher by by key.
> *
> * @param key Key for search.
> * @return flusher.
> */
> private Flusher flusher(K key) {
> int h, idx;
> if (flushThreadCntIsPowerOfTwo)
> idx = ((h = key.hashCode()) ^ (h >>> 16)) & (flushThreadCnt - 1);
> else
> idx = ((h = key.hashCode()) ^ (h >>> 16)) % flushThreadCnt;
> return flushThreads[idx];
> }
> {code}
> In case when flushThreadCount is not a power of 2 and incoming key.hashCode() < 0 (e.g. for UUID string) we will get IndexOutOfBoundException.
> http://apache-ignite-users.70518.x6.nabble.com/Bug-in-GridCacheWriteBehindStore-td36189.html
--
This message was sent by Atlassian Jira
(v8.3.4#803005)