Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • HBASE-14850
    • None
    • None
    • Reviewed

    Attachments

      1. HBASE-18578.000.patch
        5 kB
        Xiaobing Zhou
      2. hbase-18578-v2.patch
        6 kB
        Enis Soztutar

      Activity

        xiaobingo Xiaobing Zhou added a comment -

        posted v0 patch.

        xiaobingo Xiaobing Zhou added a comment - posted v0 patch.
        xiaobingo Xiaobing Zhou added a comment -

        It runs into broken promise exception, e.g.

        I0811 23:05:53.956799   402 rpc-client.cc:86] RpcClient Exception: N5folly13BrokenPromiseE: Broken promise for type name `St10unique_ptrIN5hbase8ResponseESt14default_deleteIS1_EE`
        I0811 23:05:53.956811   402 rpc-test.cc:240] RPC pause returned: N5folly13BrokenPromiseE: Broken promise for type name `St10unique_ptrIN5hbase8ResponseESt14default_deleteIS1_EE`.
        

        Steps to reproduce it:

        1. buck test --no-cache --no-results-cache //connection:rpc-test
        2. GLOG_v=3 ./buck-out/gen/connection/rpc-test
        xiaobingo Xiaobing Zhou added a comment - It runs into broken promise exception, e.g. I0811 23:05:53.956799 402 rpc-client.cc:86] RpcClient Exception: N5folly13BrokenPromiseE: Broken promise for type name `St10unique_ptrIN5hbase8ResponseESt14default_deleteIS1_EE` I0811 23:05:53.956811 402 rpc-test.cc:240] RPC pause returned: N5folly13BrokenPromiseE: Broken promise for type name `St10unique_ptrIN5hbase8ResponseESt14default_deleteIS1_EE`. Steps to reproduce it: buck test --no-cache --no-results-cache //connection:rpc-test GLOG_v=3 ./buck-out/gen/connection/rpc-test
        enis Enis Soztutar added a comment -

        xiaobingo you are getting broken promise, because if a promise is left unfulfilled at the time of the destruction, then the future throws broken promise, the code is here: https://github.com/facebook/folly/blob/master/folly/futures/detail/Core.h#L210.

        The problem is that in the test for the pause RPC, the test does and async RPC, but does not wait on the returned Future in v1 patch, and instead goes ahead and stops the server which then causes the RPC Client pipeline to the destructed. Since the RPC takes 500ms, it always fails because server and pipeline is destructed. The patch at HBASE-18204 solves the broken promise problem because at the time of pipeline destruction, we already fulfill the promises from the client-dispatcher. I've tested the patch with this patch, and it is doing the expected behavior.

        The fix to the test is calling Future.get() before stopping the server. Attaching v2.

        enis Enis Soztutar added a comment - xiaobingo you are getting broken promise, because if a promise is left unfulfilled at the time of the destruction, then the future throws broken promise, the code is here: https://github.com/facebook/folly/blob/master/folly/futures/detail/Core.h#L210 . The problem is that in the test for the pause RPC, the test does and async RPC, but does not wait on the returned Future in v1 patch, and instead goes ahead and stops the server which then causes the RPC Client pipeline to the destructed. Since the RPC takes 500ms, it always fails because server and pipeline is destructed. The patch at HBASE-18204 solves the broken promise problem because at the time of pipeline destruction, we already fulfill the promises from the client-dispatcher. I've tested the patch with this patch, and it is doing the expected behavior. The fix to the test is calling Future.get() before stopping the server. Attaching v2.
        enis Enis Soztutar added a comment -

        Pushed v2 patch. Thanks xiaobingo for the patch.

        enis Enis Soztutar added a comment - Pushed v2 patch. Thanks xiaobingo for the patch.

        People

          xiaobingo Xiaobing Zhou
          xiaobingo Xiaobing Zhou
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved: