ignite: java.lang.IndexOutOfBoundsException + Failed to wait for completion of partition map exchange

來源:互聯網
上載者:User

標籤:null   read   partition   並且   star   XA   version   類型   cas   

異常描述:

2018-06-06 14:24:02.932 ERROR 17364 --- [ange-worker-#42] .c.d.d.p.GridDhtPartitionsExchangeFuture : Failed to reinitialize local partitions (preloading will be stopped):     ...java.lang.IndexOutOfBoundsException: index 678    ... org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2279) [ignite-core-2.3.0.jar:2.3.0]    at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) [ignite-core-2.3.0.jar:2.3.0]    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]2018-06-06 14:24:02.932  INFO 17364 --- [ange-worker-#42] .c.d.d.p.GridDhtPartitionsExchangeFuture : Finish exchange future [startVer=AffinityTopologyVersion [topVer=1, minorTopVer=1], resVer=null, err=java.lang.IndexOutOfBoundsException: index 678]2018-06-06 14:24:02.941 ERROR 17364 --- [ange-worker-#42] .i.p.c.GridCachePartitionExchangeManager : Failed to wait for completion of partition map exchange (preloading will not start): GridDhtPartitionsExchangeFuture ...org.apache.ignite.IgniteCheckedException: index 678    at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7252) ~[ignite-core-2.3.0.jar:2.3.0]    ....org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2279) ~[ignite-core-2.3.0.jar:2.3.0]    ... 2 common frames omitted

出現這個情況的原因如下:

如果定義的緩衝類型是REPLICATED模式,並且開啟了持久化,後面將其改為PARTITIONED模式,並匯入資料,後續重啟的時候就會報這個錯誤。

比如下面這種情況:

default-config.xml

        <property name="cacheConfiguration">            <list>                <bean class="org.apache.ignite.configuration.CacheConfiguration">                  ...                    <property name="name" value="Test"/>                    <property name="atomicityMode" value="ATOMIC"/>                    <property name="cacheMode" value="REPLICATED"/>                  ...                </bean>            </list>        </property>
        ignite.destroyCache("Test");        IgniteCache<Long, CommRate> cache = ignite.getOrCreateCache("Test");

當重新啟動的時候,default-config.xml中的配置先生效,所以會出現這個問題。

解決辦法就是在持久化模式下不要更改緩衝模式,或者不要在設定檔中預定義緩衝類型。

I can‘t reproduce your case. But the issue could occur if you had a REPLICATED cache and after some time changed it to PARTITIONED and for example call to getOrCreateCache keeping old cache name.

參考連結:

http://apache-ignite-users.70518.x6.nabble.com/Weird-index-out-bound-Exception-td14905.html

ignite: java.lang.IndexOutOfBoundsException + Failed to wait for completion of partition map exchange

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.