You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by bu...@apache.org on 2007/04/03 04:26:18 UTC

DO NOT REPLY [Bug 42026] New: - Various concurrency issues

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42026>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42026

           Summary: Various concurrency issues
           Product: Xindice
           Version: cvs head (1.1)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DB Engine
        AssignedTo: xindice-dev@xml.apache.org
        ReportedBy: nshilenkova@gmail.com


Xindice has several concurrency problems that appear when several threads
execute different operation on the same resource, i.e. one thread adds a
document when another deletes a document with the same key, or two threads
adding documents with the same key. Most often it results in exception, but even
when it does not throw an exception, the database integrity can be broken, as
one document ended up in a filer, another document got indexed. BTreeFiler has a
tendency to lose pages in those conditions (means that page is obtained but not
linked to the tree). And so on... 
Patch attached.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42026] - Various concurrency issues

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42026>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42026


vgritsenko@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42026] - Various concurrency issues

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42026>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42026





------- Additional Comments From nshilenkova@gmail.com  2007-04-13 18:39 -------
(In reply to comment #2)
> Applied parts of the patch. Unfortunately patch for Collection class could not
> be applied due to merge conflicts. Would you mind re-submitting the patch
> against latest version of Collection class?

Will do.
 
> Also, in CollectionManager class, I noticed synchronized block against map's
> values collection:
> 
>     public boolean close() throws DBException {
>         java.util.Collection values = collections.values();
>         synchronized (values) {
> 
> Everywhere else synchronization is done against collections map itself. Can you
> explain why here synchronization is done on values?

Sure I can. After some experimenting I forgot to change it back to synchronize
on collection :) Thanks for noticing the problem.

Natalia


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42026] - Various concurrency issues

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42026>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42026


vgritsenko@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Additional Comments From vgritsenko@apache.org  2007-04-11 15:29 -------
Applied parts of the patch. Unfortunately patch for Collection class could not
be applied due to merge conflicts. Would you mind re-submitting the patch
against latest version of Collection class?

Also, in CollectionManager class, I noticed synchronized block against map's
values collection:

    public boolean close() throws DBException {
        java.util.Collection values = collections.values();
        synchronized (values) {

Everywhere else synchronization is done against collections map itself. Can you
explain why here synchronization is done on values?

Thanks
Vadim

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42026] - Various concurrency issues

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42026>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42026


vgritsenko@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From vgritsenko@apache.org  2007-04-18 18:48 -------
applied

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42026] - Various concurrency issues

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42026>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42026





------- Additional Comments From nshilenkova@gmail.com  2007-04-13 18:44 -------
Created an attachment (id=19956)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19956&action=view)
Update

Collection and CollectionManager classes updates.
Please let me know if you need updates for some other classes as well.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42026] - Various concurrency issues

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42026>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42026





------- Additional Comments From nshilenkova@gmail.com  2007-04-02 19:30 -------
Created an attachment (id=19895)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19895&action=view)
Patch

Concurrency, BTree & other fixes. Additional tests.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.