Reader Task for Xmpp Session

Bug #1437080 reported by Nipa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Trunk
New
Wishlist
Nipa

Bug Description

Two Xmpp Session Reader Tasks for the same session cannot run in parallel as we read date from tcp socket and save the regexed buffers and read pointers.

Even if two reader sessions are scheduled ensure they do not run in parallel by setting the GetSessionInstance() to be unique for each session.

Note this change is needed for XmppConnection::GetIndex() to ensure the tasks beloning to same session dont run in parallel.

    int GetIndex() const { if (state_machine->IsAuthEnabled()) {
        // remote endpoint port determines the reader task instance id, //session->AsyncReadStart();
        // so two tasks with same remote port cannot run in parallel. state_machine->SendConnectionInfo(&info, event.Name(),
        // This ensures only one task will run OnRead on a session. "Open Confirm");
        // return transit<OpenConfirm>();
        // Note for an xmpp client the remote port will be the same for } else {
        // various xmpp servers, so the limitation on client side is we connection->StartKeepAliveTimer();
        // will have only one reader task executing at a time. state_machine->SendConnectionInfo(&info, event.Name(),
       // return endpoint_.port(); "Established");
        return 0; return transit<XmppStreamEstablished>();
                                                                                                                           }
    }

Additionally, add the "AsyncReadStart" unconditionally while sending OpenConfirm to simulate two tasks for the same session.
Run all tests and ensure this works - TODO

Nipa (nipak)
Changed in juniperopenstack:
importance: Undecided → Wishlist
assignee: nobody → Nipa (nipak)
information type: Proprietary → Public
Nischal Sheth (nsheth)
tags: added: contrail-control
Nipa (nipak)
no longer affects: juniperopenstack
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.