1 Reply Latest reply on May 18, 2012 3:51 AM by galder.zamarreno

    how ISPN handles intermittent exception in cache store

    dex80526

      I have a cache store with h2db. The director for the h2db data is on a CIFS share. Once a while, I will see the following errors (at the end).

      This might be caused by CIFS share. But, other tests show the share is accessbile when this exception occurs.

      My questions are:

       

      Are there anyone seeing similar issues?

       

      In addiiotn, the cache store is configured as "write-behind" or asynchronous, and uses connection pool, there is no easy way for me to catch the exception in my code, since the put() is already completed sucessfully.

       

      How does ISPN handle this kind of exceptions to ensure the consistency?

      What is the best practice to handle this kind errors?

       

      2012-05-15/23:15:00.180/MDT [CoalescedAsyncStore-39] ERROR org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore[245] - ISPN008024: Error while storing string key to database; key: '1eda23758be9e36e5e0d2a6a87de584aaca0193f', buffer size of value: 1052 bytes

      org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.IOException: No such device"; "/test/data/user_10.200.22.21/UserProfile.h2.db"; SQL statement:

      INSERT INTO INFORMATION_SCHEMA.LOB_DATA(BLOCK, COMPRESSED, DATA) VALUES(?, ?, ?) [90031-162]

              at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)

              at org.h2.message.DbException.get(DbException.java:158)

              at org.h2.message.DbException.convertIOException(DbException.java:315)

              at org.h2.store.FileStore.readFully(FileStore.java:278)

              at org.h2.store.PageStore.readPage(PageStore.java:1278)

              at org.h2.store.PageStore.getPage(PageStore.java:728)

              at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:226)

              at org.h2.index.PageDataNode.remapChildren(PageDataNode.java:186)

              at org.h2.index.PageData.setPageId(PageData.java:161)

              at org.h2.index.PageDataIndex.addTry(PageDataIndex.java:178)

              at org.h2.index.PageDataIndex.add(PageDataIndex.java:130)

              at org.h2.table.RegularTable.addRow(RegularTable.java:121)

              at org.h2.command.dml.Insert.insertRows(Insert.java:124)

              at org.h2.command.dml.Insert.update(Insert.java:84)

              at org.h2.command.CommandContainer.update(CommandContainer.java:73)

              at org.h2.command.Command.executeUpdate(Command.java:226)

              at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:181)

              at org.h2.store.LobStorage.storeBlock(LobStorage.java:689)

              at org.h2.store.LobStorage.addLob(LobStorage.java:539)

              at org.h2.store.LobStorage.createBlob(LobStorage.java:791)

              at org.h2.jdbc.JdbcConnection.createBlob(JdbcConnection.java:1679)

              at org.h2.jdbc.JdbcPreparedStatement.setBinaryStream(JdbcPreparedStatement.java:855)

              at org.h2.jdbc.JdbcPreparedStatement.setBinaryStream(JdbcPreparedStatement.java:876)

              at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:240)

              at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:87)

              at org.infinispan.loaders.LockSupportCacheStore.store(LockSupportCacheStore.java:207)

              at org.infinispan.loaders.decorators.AbstractDelegatingStore.store(AbstractDelegatingStore.java:70)

              at org.infinispan.loaders.decorators.AsyncStore.applyModificationsSync(AsyncStore.java:246)

              at org.infinispan.loaders.decorators.AsyncStore$AsyncProcessor.put(AsyncStore.java:407)

              at org.infinispan.loaders.decorators.AsyncStore$AsyncProcessor.innerRun(AsyncStore.java:391)

              at org.infinispan.loaders.decorators.AsyncStore$AsyncProcessor.run(AsyncStore.java:314)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

              at java.lang.Thread.run(Thread.java:722)

      Caused by: java.io.IOException: No such device

              at java.io.RandomAccessFile.readBytes(Native Method)

              at java.io.RandomAccessFile.read(RandomAccessFile.java:355)

              at org.h2.store.fs.FileDisk.read(FilePathDisk.java:422)

              at org.h2.store.fs.FileUtils.readFully(FileUtils.java:357)

              at org.h2.store.FileStore.readFully(FileStore.java:276)

              ... 30 more