curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CURATOR-275) Allow service instances to be disabled temporarily
Date Sat, 25 Mar 2017 00:26:42 GMT


ASF GitHub Bot commented on CURATOR-275:

GitHub user Randgalt opened a pull request:

    CURATOR-275 UnrecognizedPropertyException: "enabled" incompatibility

    Here is a potential fix for the issue folks. Let me know what you think...
    For users who don't want the new "enabled" field serialized, you can create a JsonInstanceSerializer
in compatibility mode:
    new JsonInstanceSerializer(payloadClass, true)
    Internally, the JsonInstanceSerializer will not serialize the enabled field. There are
tests to ensure that this will deserialize in old clients.
    Going forward, JsonInstanceSerializer now sets ignore fields in the ObjectMapper.

You can merge this pull request into a Git repository by running:

    $ git pull CURATOR-394

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #208
commit 070f1c9e4dae947ba21b015ea5027c3d20d170bd
Author: randgalt <>
Date:   2017-03-25T00:22:48Z

    CURATOR-275 introduced a new field into ServiceInstance. This caused a potential UnrecognizedPropertyException
in older clients that read newly serialized ServiceInstances. Added an alternate ctor to JsonInstanceSerializer
with a compatibleSerializationMode option. when set to true, the new enabled field of ServiceInstance
is not serialized.


> Allow service instances to be disabled temporarily
> --------------------------------------------------
>                 Key: CURATOR-275
>                 URL:
>             Project: Apache Curator
>          Issue Type: New Feature
>          Components: Recipes
>            Reporter: Joe Littlejohn
>            Assignee: Jordan Zimmerman
>             Fix For: 3.3.0, 2.12.0
> Allow service instances to be temporarily removed from discovery (when using the Service
Discovery recipe). 
> This can be achieved with a new 'enabled' flag that is included as part of the service
instance node data in Zookeeper. Updating this flag via e.g. Exhibitor will allow an instance
to be disabled. When the flag is omitted, the service is assumed to be enabled, hence this
change is backward compatible.

This message was sent by Atlassian JIRA

View raw message