You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org> on 2008/08/01 04:50:33 UTC

[jira] Created: (ZOOKEEPER-108) sync implementation reorders operations

sync implementation reorders operations
---------------------------------------

                 Key: ZOOKEEPER-108
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
             Project: Zookeeper
          Issue Type: Bug
          Components: server
            Reporter: Flavio Paiva Junqueira


The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.

I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621406#action_12621406 ] 

Hudson commented on ZOOKEEPER-108:
----------------------------------

Integrated in ZooKeeper-trunk #50 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/50/])

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.0.0
>
>         Attachments: SyncTest.java, ZOOKEEPER-108-TEST.patch, ZOOKEEPER-108-TEST.patch, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-108:
---------------------------------------------

    Attachment:     (was: ZOOKEEPER-108.patch)

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620732#action_12620732 ] 

Mahadev konar commented on ZOOKEEPER-108:
-----------------------------------------

+1 for the patch. 

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619700#action_12619700 ] 

Mahadev konar commented on ZOOKEEPER-108:
-----------------------------------------

as far as I understand this patch .... 

the problem seems to be that the leader is sending the commit for sync's out of order. Is that true? 
Also I dont understand the reasoning behind moving the pedning syncs up to the servers?


> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-108:
---------------------------------------------

    Attachment: ZOOKEEPER-108-TEST.patch

Adding test for sync call. This test currently only checks the implementation of a standalone zookeeper. If I get a +1 on this test, then I can work on adding a second test that performs the same sequence of operations, but for a quorum configuration instead.  

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.0.0
>
>         Attachments: SyncTest.java, ZOOKEEPER-108-TEST.patch, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620840#action_12620840 ] 

Mahadev konar commented on ZOOKEEPER-108:
-----------------------------------------

my mistake. :) I shouldnt have committed it without a test.

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.0.0
>
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-108:
-----------------------------------

    Attachment: ZOOKEEPER-108-TEST.patch

Minor cleanups of warnings/findbugs issues.

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.0.0
>
>         Attachments: SyncTest.java, ZOOKEEPER-108-TEST.patch, ZOOKEEPER-108-TEST.patch, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-108:
---------------------------------------------

    Status: Patch Available  (was: Open)

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>         Attachments: ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt reopened ZOOKEEPER-108:
------------------------------------


The test was not committed. I'll submit a patch once ZOOKEEPER-111 goes in.

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.0.0
>
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-108:
---------------------------------------------

    Attachment: SyncTest.java

This is the java program that I used to debug this problem.

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619147#action_12619147 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-108:
--------------------------------------------------

When calling sync() with multiple asynchronous requests pending, a zookeeper server delivers the requests out of order. For example, if a client submits a request, say an asynchronous create, followed by a sync, then the zookeeper server the client is connected to might deliver the sync and create in the inverse order, causing the client to drop the connection. This happens because pendingSyncs in CommitProcessor is updated in the wrong place. 

In the attached patch, I have moved pendingSyncs to FollowerZooKeeperServer, and have made pendingSyncs thread safe by using a ConcurrentLinkedQueue. Note that there is also code on Leader.java to handle syncs, and I have added code to process syncs locally in the case the client is connected to the leader.



> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-108:
---------------------------------------------

    Attachment: ZOOKEEPER-108.patch

Thanks for the comments, Mahadev. I have removed the unnecessary imports and added a comment on the code you found confusing. The new patch reflects those changes.


> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-108:
---------------------------------------------

    Attachment: ZOOKEEPER-108.patch

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>         Attachments: ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619068#action_12619068 ] 

Mahadev konar commented on ZOOKEEPER-108:
-----------------------------------------

flavio can you explain the race condition so that a reviewer would know what the problem is and it would be easier for him to review the patch. thanks 

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>         Attachments: ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar reassigned ZOOKEEPER-108:
---------------------------------------

    Assignee: Flavio Paiva Junqueira

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-108:
---------------------------------------------

    Status: Patch Available  (was: Reopened)

ZOOKEEPER-108.patch has been committed already. The new patch to review is ZOOKEEPER-108-TEST.patch.

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.0.0
>
>         Attachments: SyncTest.java, ZOOKEEPER-108-TEST.patch, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-108:
---------------------------------------------

    Attachment: ZOOKEEPER-108.patch

Forgot to make the patch relative to the trunk.

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620810#action_12620810 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-108:
--------------------------------------------------

Don't worry, Pat. I have a patch almost ready for the test.

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.0.0
>
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620462#action_12620462 ] 

Mahadev konar commented on ZOOKEEPER-108:
-----------------------------------------

it took me a while to understand the bug and the fix :) ...

the patch looks good -- with a few comments -- 

1) there are two unnecessary imports -- 

one of commitprocessor in followerrequestprocessor
the other one of linkedlist in followerzookeeperserver

can we remove them?

2) 
this code is a little confusing thugh it was there before as well -- 

        if(request.type == ZooDefs.OpCode.sync){
            zks.getLeader().processSync(request);

            if(!zks.getLeader().syncHandler.containsKey(request.sessionId)){
                zks.getLeader().syncHandler.put(request.sessionId, null);
                nextProcessor.processRequest(request);
            }

        }

this is in ProposalRequestProcessor -

why dont we do nextprocessor.processRequest if we have the session in the synchandler?


> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-108:
------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.0
     Hadoop Flags: [Reviewed]
           Status: Resolved  (was: Patch Available)

I just committed this. THanks Flavio. 

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.0.0
>
>         Attachments: SyncTest.java, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619072#action_12619072 ] 

Patrick Hunt commented on ZOOKEEPER-108:
----------------------------------------

Sounds like something that we should verify via a unit test. Any way to test this case?

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-108:
---------------------------------------------

    Attachment:     (was: ZOOKEEPER-108.patch)

> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: SyncTest.java
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-108) sync implementation reorders operations

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-108:
-----------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed ZOOKEEPER-108-TEST.patch as revision 684175.



> sync implementation reorders operations
> ---------------------------------------
>
>                 Key: ZOOKEEPER-108
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-108
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.0.0
>
>         Attachments: SyncTest.java, ZOOKEEPER-108-TEST.patch, ZOOKEEPER-108-TEST.patch, ZOOKEEPER-108.patch
>
>
> The current implementation of sync is broken. There is a race condition that causes a follower to return operations out of order, causing clients to drop their connections to a server.
> I'll be attaching a patch to fix this problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.