Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-544

Implement SessionFailedRetryPolicy

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.3.0
    • 5.0.0
    • Client
    • None

    Description

      https://lists.apache.org/x/thread.html/2549c310c1e3232d2f746bf1cf7110c094ea2ca9d1e54b34b75a508f@%3Cuser.curator.apache.org%3E

      Currently Curator will always reset on session expire and instance a new ZK client as well as recover state.

      Because on session expire ephemeral znodes get deleted, some of user cases possibly want to manually handle session expire before automatically reset o.a.c.ConnectionState.

      I propose implement a SessionConnectionHandlingPolicy whose callWithRetry use SessionFailRetryLoop so that o.a.c.ConnectionState fails on session expired.

      BTW, it would be a user-friendly way to make user of SessionFailRetryLoop.

      I volunteer to work on an implementation.

      What do you think?

      CC randgalt

      As time goes by, we change a bit what API looks like. For implement the same functionality, we change code of RetryPolicy instead. To be brief, we (1) move RetryLook.isRetriableException to RetryPolicy#allowRetry(Exception) and existing impls have a default impl that keeps the manner (2) impl a SessionFailedRetryPolicy that throws when SessionExipredException tested, while the other examination delegated to another policy.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tison Zili Chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1.5h
                1.5h