Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-3597

Defer sending response to reload op until the ProcessReloadHandler has changed the process state

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.0.0.Beta2
    • None
    • Management
    • None

    Description

      Currently the response to the reload op goes out to the client as soon as the op commits, not waiting for the op to complete. It can't wait for the op to complete, because op completion may not occur before the service managing the connection to the client is stopped. But sending the response on commit is too early, as the ProcessReloadHandler hasn't even begun the reload yet. If a client receives that response and immediately begins polling for the server in RUNNING state (i.e. completed reload) there is a race where it's possible the client sees the server as RUNNING before the reload has begun, rather than after.

      https://github.com/wildfly/wildfly-core/pull/3098 for WFCORE-3594 helps mitigate the chances of this by putting the process in STOPPING state a bit faster. But an ultimate solution requires the ProcessReloadHandler being able to signal when the response should go out. I think this can be done via an OperationContext attachment that the current code that sends the response on commit would attach.

      Attachments

        Issue Links

          Activity

            People

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: