Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0-M13
    • Fix Version/s: 1.0.0-M14
    • Labels:
      None

      Description

      ClientAbandonRequestTest.testAbandonSearch() fails occasionally on Jenkins. To demonstrate it I added the MulitThreadedMultiInvoker, please run the test with system properties "-Dmtmi.invocations=1000 -Dmtmi.trace=true" which runs each test method multiple times. The problem is that sometimes the abandon request has no effect but the client receives all search result. I'm not sure if it is a problem is located in the client API or on the server side.

        Activity

        Hide
        elecharny Emmanuel Lecharny added a comment -

        Closing the resolved issues.

        Show
        elecharny Emmanuel Lecharny added a comment - Closing the resolved issues.
        Show
        seelmann Stefan Seelmann added a comment - Fixed here: http://svn.apache.org/viewvc?rev=1397918&view=rev
        Hide
        seelmann Stefan Seelmann added a comment -

        Thanks Emmanuel for the pointers.

        When adding a Thread.sleep(1000) just after the connection.search() call the test fails always. So in that case it seems the server already sent all results. This proves your theory.

        When increasing numEntires from 100 to 1000 the test passes (with 100000 repetitions). However such a change is still not reliable.

        I followed your advise with the interceptor and an entry filter. Such an interceptor already existed as inner class of SearchLimitsIT. I extracted that interceptor and moved it to test-framework module so it can be reused in ClientAbandonRequestTest.

        Show
        seelmann Stefan Seelmann added a comment - Thanks Emmanuel for the pointers. When adding a Thread.sleep(1000) just after the connection.search() call the test fails always. So in that case it seems the server already sent all results. This proves your theory. When increasing numEntires from 100 to 1000 the test passes (with 100000 repetitions). However such a change is still not reliable. I followed your advise with the interceptor and an entry filter. Such an interceptor already existed as inner class of SearchLimitsIT. I extracted that interceptor and moved it to test-framework module so it can be reused in ClientAbandonRequestTest.
        Hide
        elecharny Emmanuel Lecharny added a comment -

        Interesting !

        Now, we have to check that the AbandonRequest arrives before the entries have been transmitted to the user, otherwise it's normal that the user receives everything.

        This version of the server computes all the results first, and fetch the entries one by one to send them to the client. It's a very fast operation (core-integ has some perf tests that demonstrates the server can fetch more than 160 000 entries per second). The set of returned entries must be big enough, and the abandonRequest must be sent fast enough for the AbandonRequest has a chance to be received and processed before it's completely sent.

        One possibility to check that the AbandonRequest is correctly processed is to add a MINA filter that slow down the sending of messages (or to add an entry Filter that does the same thing). Adding an interceptor that adds a Flter is also an option.

        Show
        elecharny Emmanuel Lecharny added a comment - Interesting ! Now, we have to check that the AbandonRequest arrives before the entries have been transmitted to the user, otherwise it's normal that the user receives everything. This version of the server computes all the results first, and fetch the entries one by one to send them to the client. It's a very fast operation (core-integ has some perf tests that demonstrates the server can fetch more than 160 000 entries per second). The set of returned entries must be big enough, and the abandonRequest must be sent fast enough for the AbandonRequest has a chance to be received and processed before it's completely sent. One possibility to check that the AbandonRequest is correctly processed is to add a MINA filter that slow down the sending of messages (or to add an entry Filter that does the same thing). Adding an interceptor that adds a Flter is also an option.

          People

          • Assignee:
            elecharny Emmanuel Lecharny
            Reporter:
            seelmann Stefan Seelmann
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development