[MGNLCACHE-111] Restart of Memcached factory throws exception Created: 02/Jun/15  Updated: 02/Jun/15  Resolved: 02/Jun/15

Status: Closed
Project: Cache Modules
Component/s: memcached
Affects Version/s: 5.4
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Antonín Juran Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Restart of Memcached factory throws exception since a delayed flush policies are trying to flush cache when the client is already stopped.

After change value in cacheFactory is thrown java.lang.IllegalStateException:
015-06-02 13:22:24,250 INFO  info.magnolia.module.ModuleManagerImpl            : Stopping module cache
2015-06-02 13:22:24.253 INFO net.spy.memcached.MemcachedConnection:  Shut down memcached client
Exception in thread "Thread-39" java.lang.IllegalStateException: Shutting down
	at net.spy.memcached.MemcachedClient.broadcastOp(MemcachedClient.java:275)
	at net.spy.memcached.MemcachedClient.broadcastOp(MemcachedClient.java:264)
	at net.spy.memcached.MemcachedClient.flush(MemcachedClient.java:1886)
	at net.spy.memcached.MemcachedClient.flush(MemcachedClient.java:1950)
	at net.spy.memcached.MemcachedClient.flush(MemcachedClient.java:126)
	at info.magnolia.module.cache.memcached.MemcachedWrapper.clear(MemcachedWrapper.java:259)
	at info.magnolia.module.cache.FlushAllListeningPolicy.preHandleEvents(FlushAllListeningPolicy.java:64)
	at info.magnolia.module.cache.AbstractListeningFlushPolicy$CacheCleaner.onEvent(AbstractListeningFlushPolicy.java:205)
	at info.magnolia.cms.util.ObservationUtil$ObservationBasedDelayedExecutor$1.run(ObservationUtil.java:253)
	at info.magnolia.cms.util.DelayedExecutor$RunnableWrapper.run(DelayedExecutor.java:103)
	at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:745)
2015-06-02 13:22:24.258 INFO net.spy.memcached.MemcachedConnection:  Shut down memcached client
Exception in thread "Thread-40" java.lang.IllegalStateException: Shutting down
	at net.spy.memcached.MemcachedClient.broadcastOp(MemcachedClient.java:275)
	at net.spy.memcached.MemcachedClient.broadcastOp(MemcachedClient.java:264)
	at net.spy.memcached.MemcachedClient.flush(MemcachedClient.java:1886)
	at net.spy.memcached.MemcachedClient.flush(MemcachedClient.java:1950)
	at net.spy.memcached.MemcachedClient.flush(MemcachedClient.java:126)
	at info.magnolia.module.cache.memcached.MemcachedWrapper.clear(MemcachedWrapper.java:259)
	at info.magnolia.module.cache.FlushAllListeningPolicy.preHandleEvents(FlushAllListeningPolicy.java:64)
	at info.magnolia.module.cache.AbstractListeningFlushPolicy$CacheCleaner.onEvent(AbstractListeningFlushPolicy.java:205)
	at info.magnolia.cms.util.ObservationUtil$ObservationBasedDelayedExecutor$1.run(ObservationUtil.java:253)
	at info.magnolia.cms.util.DelayedExecutor$RunnableWrapper.run(DelayedExecutor.java:103)
	at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:745)
2015-06-02 13:22:24,283 INFO  info.magnolia.module.ModuleManagerImpl            : Starting module cache
2015-06-02 13:22:24.283 INFO net.spy.memcached.MemcachedConnection:  Added {QA sa=/10.99.122.42:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2015-06-02 13:22:24.286 INFO net.spy.memcached.MemcachedConnection:  Added {QA sa=/10.99.122.42:11212, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2015-06-02 13:22:24.289 INFO net.spy.memcached.MemcachedConnection:  Connection state changed for sun.nio.ch.SelectionKeyImpl@142ad371
2015-06-02 13:22:24.289 INFO net.spy.memcached.MemcachedConnection:  Connection state changed for sun.nio.ch.SelectionKeyImpl@355c2b2

Generated at Sun Feb 11 23:52:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.