|
List Info
Thread: Created: (JBCACHE-1357) Root nodes of marshalled regions won't be loaded
|
|
| Created: (JBCACHE-1357) Root nodes of
marshalled regions won't be loaded |
  United States |
2008-05-30 10:02:46 |
Root nodes of marshalled regions won't be loaded correclty
from cache loaders
------------------------------------------------------------
-----------------
Key: JBCACHE-1357
URL: http:/
/jira.jboss.com/jira/browse/JBCACHE-1357
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Cache loaders
Affects Versions: 1.4.1.SP9
Reporter: Galder Zamarreno
Assigned To: Galder Zamarreno
Yesterday while looking at a support case, I discovered an
awkward
behavior when it came to root region based marshalling nodes
and
cache loaders.
Let's say you have a cache configured with a cache loader
and have
a region marshaled called starting at /me. I have created an
MBean
so that I can register/unregister classloader and
activate/deactivate
the region upon deployment/undeployment of the classes I
wanna
put under /me.
Now, let's say that I put a k,v in /me which will get stored
in the cache
loader. If I know touch the deployment archive to force a
redeployment
and check the contents of the cache, they're empty. If I try
to get the k I
put under /me, it'll return nothing. Why?
Simple: The cache instance is configured to preload from
root (/) but
when the region is activated, /me node is created. When the
preloading
phase comes, a check is made to see whether the node needs
to be
loaded:
private boolean mustLoad(DataNode n, Object key)
{
if (log.isTraceEnabled())
{
log.trace("mustLoad called with key=" +
key + " and datanode=" + n);
}
return n == null ||
(n.containsKey(TreeCache.UNINITIALIZED)
&& (key == null || !n.containsKey(key)));
}
The problem is that nothing will be preloaded for at least
the /me node,
because the node is not null, and it's not
TreeCache.UNINITIALIZED. Any
child nodes under the region node do not have issues like
this.
This is likely a bug: maybe when the region is activated,
the node should
probably be created as TreeCache.UNINITIALIZED? I think this
would work).
It's true that you could say that putting data at the root
node of the region is
not a good idea regardless, but I think deep down this is a
bug.
p.s. This is at least present in 1.4.x, need to check
trunk.
Manik: I agree this is a bug. Could you raise a JIRA for
this? Also agree with
your solution, that when a region is activated and if a node
needs to be
created, it should be uninitialized.
If you create a unit test, could you add it to trunk as
well?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira
_______________________________________________
jboss-jira mailing list
jboss-jira lists.jboss.org
h
ttps://lists.jboss.org/mailman/listinfo/jboss-jira
|
|
| Updated: (JBCACHE-1357) Root nodes of
marshalled regions won't be loaded |
  United States |
2008-06-09 12:39:48 |
[ http://jira.jboss.com/jira/browse/JBCACHE-1357?page=all
a> ]
Manik Surtani updated JBCACHE-1357:
-----------------------------------
Fix Version/s: 1.4.X
> Root nodes of marshalled regions won't be loaded
correclty from cache loaders
>
------------------------------------------------------------
-----------------
>
> Key: JBCACHE-1357
> URL: http:/
/jira.jboss.com/jira/browse/JBCACHE-1357
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Cache loaders
> Affects Versions: 1.4.1.SP9
> Reporter: Galder Zamarreno
> Assigned To: Galder Zamarreno
> Fix For: 1.4.X
>
>
> Yesterday while looking at a support case, I discovered
an awkward
> behavior when it came to root region based marshalling
nodes and
> cache loaders.
> Let's say you have a cache configured with a cache
loader and have
> a region marshaled called starting at /me. I have
created an MBean
> so that I can register/unregister classloader and
activate/deactivate
> the region upon deployment/undeployment of the classes
I wanna
> put under /me.
> Now, let's say that I put a k,v in /me which will get
stored in the cache
> loader. If I know touch the deployment archive to force
a redeployment
> and check the contents of the cache, they're empty. If
I try to get the k I
> put under /me, it'll return nothing. Why?
> Simple: The cache instance is configured to preload
from root (/) but
> when the region is activated, /me node is created. When
the preloading
> phase comes, a check is made to see whether the node
needs to be
> loaded:
> private boolean mustLoad(DataNode n, Object key)
> {
> if (log.isTraceEnabled())
> {
> log.trace("mustLoad called with
key=" + key + " and datanode=" + n);
> }
> return n == null ||
> (n.containsKey(TreeCache.UNINITIALIZED)
&& (key == null || !n.containsKey(key)));
> }
> The problem is that nothing will be preloaded for at
least the /me node,
> because the node is not null, and it's not
TreeCache.UNINITIALIZED. Any
> child nodes under the region node do not have issues
like this.
> This is likely a bug: maybe when the region is
activated, the node should
> probably be created as TreeCache.UNINITIALIZED? I think
this would work).
> It's true that you could say that putting data at the
root node of the region is
> not a good idea regardless, but I think deep down this
is a bug.
> p.s. This is at least present in 1.4.x, need to check
trunk.
> Manik: I agree this is a bug. Could you raise a JIRA
for this? Also agree with
> your solution, that when a region is activated and if a
node needs to be
> created, it should be uninitialized.
> If you create a unit test, could you add it to trunk as
well?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira
_______________________________________________
jboss-jira mailing list
jboss-jira lists.jboss.org
h
ttps://lists.jboss.org/mailman/listinfo/jboss-jira
|
|
| Commented: (JBCACHE-1357) Root nodes of
marshalled regions won't be loade |
  United States |
2008-06-09 12:39:48 |
[ http://jira.jboss.com/jira/browse/JB
CACHE-1357?page=comments#action_12416111 ]
Manik Surtani commented on JBCACHE-1357:
----------------------------------------
Any thoughts on whether this affects 2.X?
> Root nodes of marshalled regions won't be loaded
correclty from cache loaders
>
------------------------------------------------------------
-----------------
>
> Key: JBCACHE-1357
> URL: http:/
/jira.jboss.com/jira/browse/JBCACHE-1357
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Cache loaders
> Affects Versions: 1.4.1.SP9
> Reporter: Galder Zamarreno
> Assigned To: Galder Zamarreno
> Fix For: 1.4.X
>
>
> Yesterday while looking at a support case, I discovered
an awkward
> behavior when it came to root region based marshalling
nodes and
> cache loaders.
> Let's say you have a cache configured with a cache
loader and have
> a region marshaled called starting at /me. I have
created an MBean
> so that I can register/unregister classloader and
activate/deactivate
> the region upon deployment/undeployment of the classes
I wanna
> put under /me.
> Now, let's say that I put a k,v in /me which will get
stored in the cache
> loader. If I know touch the deployment archive to force
a redeployment
> and check the contents of the cache, they're empty. If
I try to get the k I
> put under /me, it'll return nothing. Why?
> Simple: The cache instance is configured to preload
from root (/) but
> when the region is activated, /me node is created. When
the preloading
> phase comes, a check is made to see whether the node
needs to be
> loaded:
> private boolean mustLoad(DataNode n, Object key)
> {
> if (log.isTraceEnabled())
> {
> log.trace("mustLoad called with
key=" + key + " and datanode=" + n);
> }
> return n == null ||
> (n.containsKey(TreeCache.UNINITIALIZED)
&& (key == null || !n.containsKey(key)));
> }
> The problem is that nothing will be preloaded for at
least the /me node,
> because the node is not null, and it's not
TreeCache.UNINITIALIZED. Any
> child nodes under the region node do not have issues
like this.
> This is likely a bug: maybe when the region is
activated, the node should
> probably be created as TreeCache.UNINITIALIZED? I think
this would work).
> It's true that you could say that putting data at the
root node of the region is
> not a good idea regardless, but I think deep down this
is a bug.
> p.s. This is at least present in 1.4.x, need to check
trunk.
> Manik: I agree this is a bug. Could you raise a JIRA
for this? Also agree with
> your solution, that when a region is activated and if a
node needs to be
> created, it should be uninitialized.
> If you create a unit test, could you add it to trunk as
well?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira
_______________________________________________
jboss-jira mailing list
jboss-jira lists.jboss.org
h
ttps://lists.jboss.org/mailman/listinfo/jboss-jira
|
|
| Commented: (JBCACHE-1357) Root nodes of
marshalled regions won't be loade |
  United States |
2008-06-09 16:30:48 |
[ http://jira.jboss.com/jira/browse/JB
CACHE-1357?page=comments#action_12416159 ]
Galder Zamarreno commented on JBCACHE-1357:
-------------------------------------------
Not thought of this yet. I've got an EAP deadline coming up
and
I'm gonna be away for a fair bit of June so not sure whether
I'll
have time to look into this before beginning of July.
> Root nodes of marshalled regions won't be loaded
correclty from cache loaders
>
------------------------------------------------------------
-----------------
>
> Key: JBCACHE-1357
> URL: http:/
/jira.jboss.com/jira/browse/JBCACHE-1357
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Cache loaders
> Affects Versions: 1.4.1.SP9
> Reporter: Galder Zamarreno
> Assigned To: Galder Zamarreno
> Fix For: 1.4.X
>
>
> Yesterday while looking at a support case, I discovered
an awkward
> behavior when it came to root region based marshalling
nodes and
> cache loaders.
> Let's say you have a cache configured with a cache
loader and have
> a region marshaled called starting at /me. I have
created an MBean
> so that I can register/unregister classloader and
activate/deactivate
> the region upon deployment/undeployment of the classes
I wanna
> put under /me.
> Now, let's say that I put a k,v in /me which will get
stored in the cache
> loader. If I know touch the deployment archive to force
a redeployment
> and check the contents of the cache, they're empty. If
I try to get the k I
> put under /me, it'll return nothing. Why?
> Simple: The cache instance is configured to preload
from root (/) but
> when the region is activated, /me node is created. When
the preloading
> phase comes, a check is made to see whether the node
needs to be
> loaded:
> private boolean mustLoad(DataNode n, Object key)
> {
> if (log.isTraceEnabled())
> {
> log.trace("mustLoad called with
key=" + key + " and datanode=" + n);
> }
> return n == null ||
> (n.containsKey(TreeCache.UNINITIALIZED)
&& (key == null || !n.containsKey(key)));
> }
> The problem is that nothing will be preloaded for at
least the /me node,
> because the node is not null, and it's not
TreeCache.UNINITIALIZED. Any
> child nodes under the region node do not have issues
like this.
> This is likely a bug: maybe when the region is
activated, the node should
> probably be created as TreeCache.UNINITIALIZED? I think
this would work).
> It's true that you could say that putting data at the
root node of the region is
> not a good idea regardless, but I think deep down this
is a bug.
> p.s. This is at least present in 1.4.x, need to check
trunk.
> Manik: I agree this is a bug. Could you raise a JIRA
for this? Also agree with
> your solution, that when a region is activated and if a
node needs to be
> created, it should be uninitialized.
> If you create a unit test, could you add it to trunk as
well?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira
_______________________________________________
jboss-jira mailing list
jboss-jira lists.jboss.org
h
ttps://lists.jboss.org/mailman/listinfo/jboss-jira
|
|
[1-4]
|
|