tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milos Volauf (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENEJB-2119) Incorrect binary tree - IvmContext
Date Mon, 19 Oct 2015 09:43:05 GMT

    [ https://issues.apache.org/jira/browse/OPENEJB-2119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14963072#comment-14963072
] 

Milos Volauf commented on OPENEJB-2119:
---------------------------------------

This bug is not about the tree not being "well balanced", it is about correctness.

In binary search tree, the following must be true:
For all nodes, all keys of left subtree must be less than the node key and all keys of right
subtree must be greater than the node key.
This should be true so that the operations on tree work correctly (lookup etc).
This bug is about this, the tree becomes not correct.



> Incorrect binary tree - IvmContext
> ----------------------------------
>
>                 Key: OPENEJB-2119
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-2119
>             Project: OpenEJB
>          Issue Type: Bug
>            Reporter: Milos Volauf
>            Priority: Critical
>         Attachments: Testing.java
>
>
> I get many javax.naming.NameAlreadyBoundException exceptions so I digged into org.apache.openejb.core.ivm.naming.IvmContext
and org.apache.openejb.core.ivm.naming.NameNode.
> I was strange that NameAlreadyBoundException was fired from IvmContext.rebind, which
does unbind and then bind.
> The debugging showed me that binary tree (implemented by NameNode) gets sometimes into
incorrect state and consequently unbind does not find the node.
> The problem is that IvmContext has a reference to NameNode and calls bind() but the binary
tree is correct only if bind() starts at the tree root. There is one big tree and several
contexts have their nodes in it (IvmContext.mynode) and bind new nodes starting in mynode.
> I prepared a small test case which shows how the tree can enter into incorrect state.
> I used openejb-core-4.7.1



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message