Version 1

    Backgrounds

     

    Currently when an activated resource adapter (deployed as module) is created / removed using the CLI the "reload-status" is set to "requires reload".

    In Teiid, it is common practice to add/remove resource adapters dynamically and restarting server will affect performance and usability severely.

    • Because delete/re-add is in Teiid's workflow to manage a resource adapters and when TEIID have to restart we loose the whole state of the virtual database. That means we need re-establish runtime status. For example, all the existing sessions will be killed.
    • Runtime environment are often shared, that could kill other person's tasks in flight leaving them hanging with errors.
    • Every time resource adapter starts TEIID fetch metadata from the source, this is very expensive operation.
    • With multi-source feature, it is a feature that user dynamically brings in/out sources as they show up on their dashboard, it would be not possible to support this feature.

    Issue Metadata

    EAP Issue: https://issues.jboss.org/browse/EAP7-578

    WF Issue: [WFLY-6774] Provide ability to start/stop Resource Adapter creation/deletion without restart of server - JBoss Issue Tra…

    Issue w/ possible regression: [WFLY-4320] add->activate->remove->add->activate fails for Resource Adapter - JBoss Issue Tracker

    Dev Contact: Stefano Maestri

    QE Contact:

    AFFECTED PROJECTS OR COMPONENTS: connector subsystem

    OTHER INTERESTED PARTIES: TEIID

    Requirements

    We need to provide a remove operation for resource adapters supporting "resource-service" paradigm. From official WF10 documentation:

    • resource-services – The operation can only immediately update the persistent configuration; applying the operation to the runtime will require a subsequent restart of some services associated with the resource. If the operation includes the request header "allow-resource-service-restart" => true, the handler for the operation will go ahead and restart the runtime service. Otherwise executing the operation will put the server into a "reload-required" state. (See the discussion of "all-services" above for more on the "reload-required" state.)

    Note, it will affect only activated resource adapters deployed in module format. Currently is possible to remove resource-adapters if they are not yet activated and it will not change.

    Test are needed to avoid possible regression on [WFLY-4320] add->activate->remove->add->activate fails for Resource Adapter - JBoss Issue Tracker

    Non-Requiremens

     

    We are not supporting any graceful remove of resource adapters. Removing resource adapter providing "allow-resource-service-restart" will stop immediately resource adapters related services eventually killing open connections. It's also up to the client ensure the operation will not break any dependent deployments. In case of not removed dependencies the operation could fail.