[
https://issues.jboss.org/browse/ISPN-2297?page=com.atlassian.jira.plugin....
]
Dan Berindei updated ISPN-2297:
-------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
https://github.com/infinispan/infinispan/pull/1384
This pull request fixes item 2, but not 1, so the bug should remain open.
Cache restart doesn't work properly
-----------------------------------
Key: ISPN-2297
URL:
https://issues.jboss.org/browse/ISPN-2297
Project: Infinispan
Issue Type: Bug
Components: Core API
Affects Versions: 5.1.7.Final, 5.2.0.Alpha3
Reporter: Dan Berindei
Assignee: Dan Berindei
Labels: jdg6
Fix For: 5.2.0.Final
Cache restart has at least two issues:
1. If a cache is stopped via {{Cache.stop()}} it will still be returned by
{{DefaultCacheManager.getCache()}}. Cache {{start()}} and {{stop()}} are not synchronized
in any way, so a {{start()}} call may return before the cache was properly started - just
because another thread is in the process of starting it.
2. {{ComponentRegistry}} keeps a few components as fields to speed up access. These
components are destroyed on {{stop()}} and re-created on {{start()}}, because they are
volatile, but the field references are not updated.
Also, the documentation of {{EmbeddedCacheManager.getCache()}} should say that it will
start the cache only if it doesn't exist yet - if the cache is stopped it will return
the cache as it was. Alternatively we could change the behaviour of {{getCache()}} to
always start the cache.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira