[infinispan-issues] [JBoss JIRA] (ISPN-10963) Remove blocking queue from RocksDBStore

Diego Lovison (Jira) issues at jboss.org
Tue Nov 19 05:03:00 EST 2019


     [ https://issues.jboss.org/browse/ISPN-10963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diego Lovison updated ISPN-10963:
---------------------------------
    Description: 
Currently you can only insert 10000 elements into the rocks db store until you will block a thread until the expiration reaper is ran. 
By default it will be running each minute and the client will totally block.


{code:java}
      cacheManager.defineConfiguration("weather", new ConfigurationBuilder()
         .persistence()
            .addStore(RocksDBStoreConfigurationBuilder.class)
            .location("target/data")
            .expiredLocation("target/expired")
         .expiration().lifespan(5, TimeUnit.SECONDS)
         .build());
      cache = cacheManager.getCache("weather");

      int max = 10001;
      for (int i=0; i<max; i++) {
         cache.put(UUID.randomUUID().toString(), UUID.randomUUID().toString());
      }
{code}

The test took 60478ms.

9999 = 1773 ms
10000 = 1797 ms

Removing the queue and writing directly to RocksDB will be faster than the current code

  was:Currently you can only insert 10000 elements into the rocks db store until you will block a thread until the expiration reaper is ran. Instead we should offer elements to the queue and upon failure utilise the persistence executors to run purge.



> Remove blocking queue from RocksDBStore
> ---------------------------------------
>
>                 Key: ISPN-10963
>                 URL: https://issues.jboss.org/browse/ISPN-10963
>             Project: Infinispan
>          Issue Type: Sub-task
>          Components: Loaders and Stores
>    Affects Versions: 9.1.0.Alpha1
>            Reporter: Diego Lovison
>            Assignee: Diego Lovison
>            Priority: Major
>             Fix For: 10.1.0.Final
>
>
> Currently you can only insert 10000 elements into the rocks db store until you will block a thread until the expiration reaper is ran. 
> By default it will be running each minute and the client will totally block.
> {code:java}
>       cacheManager.defineConfiguration("weather", new ConfigurationBuilder()
>          .persistence()
>             .addStore(RocksDBStoreConfigurationBuilder.class)
>             .location("target/data")
>             .expiredLocation("target/expired")
>          .expiration().lifespan(5, TimeUnit.SECONDS)
>          .build());
>       cache = cacheManager.getCache("weather");
>       int max = 10001;
>       for (int i=0; i<max; i++) {
>          cache.put(UUID.randomUUID().toString(), UUID.randomUUID().toString());
>       }
> {code}
> The test took 60478ms.
> 9999 = 1773 ms
> 10000 = 1797 ms
> Removing the queue and writing directly to RocksDB will be faster than the current code



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the infinispan-issues mailing list