This discussion is archived
1 Reply Latest reply: Oct 7, 2013 7:41 AM by Ricardo Ferreira RSS

Behaviour of QueueDelay in write-behind

michael gerber2 Newbie
Currently Being Moderated

Hi,

We have an embedded write-behind cache with multiple instances. The QueueDelay parameter was initially 1, but it has been increased recently through JMX to decrease the number of DB calls. The QueueDelay was increased to 864000 which successfully stopped the application to persist objects. Now, when we set the QueueDelay back to 1, it does not persist anything, the size of the queue is still growing.

Question1: is there any easy way to force the cache to persist these items? JMX-settings?

Question2: in case of application restarts the node will persist everything from the queue first, and only after that will stop. Is it safe to do this way? (if there is no better option)

Platform: Coherence 3.7.1.5 and Oracle DB 10g.


Cache-config:

<distributed-scheme>

  <scheme-name>distributed-write-delay</scheme-name>

  <service-name>DistributedWriteDelayCache</service-name>

  <backing-map-scheme>

  <read-write-backing-map-scheme>

  <scheme-name>persistent-backing-map</scheme-name>

  <internal-cache-scheme>

  <local-scheme />

  </internal-cache-scheme>

  <cachestore-scheme>

  <class-scheme>

  <class-name>spring-bean:myCacheStore</class-name>

  </class-scheme>

  </cachestore-scheme>

  <write-delay>

  1ms

  </write-delay>

  <write-batch-factor>

  0.5

  </write-batch-factor>

  </read-write-backing-map-scheme>

  </backing-map-scheme>

  <autostart>true</autostart>

</distributed-scheme>

  • 1. Re: Behaviour of QueueDelay in write-behind
    Ricardo Ferreira Newbie
    Currently Being Moderated

    Is there any contextual transactional scope that Coherence is participating, such as global XA transactions?

     

    Or, we are just talking about simple puts() that creates/updates objects in the distributed cache?

     

    If the first option is true, your ReadWriteBackingMapScheme maybe is affected but transaction locks that suspend transactions before everything else is committed.

     

    I believe that with a graceful shutdown, Coherence will flush pending transactions first, before actually shutdown the Coherence services and the JVM itself.

     

    Cheers,

     

    Ricardo Ferreira

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points