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-394) UnrecognizedPropertyException: "enabled" incompatibility
Date Fri, 31 Mar 2017 06:54:41 GMT


ASF GitHub Bot commented on CURATOR-394:

Github user lvfangmin commented on the issue:
    One concern is that this diff changed the default behavior to not passing 'enable', which
will break the users who are already using service discovery server and client with the enable
    If I understand correctly, there are 4 cases:
    1. discovery server: w enable,     client: w enable
    2. discovery server: w/o enable, client: w/o enable
    3. discovery server: w/o enable, client: w enable
    4. discovery server: w enable,    client: w/o enable
    The first 2 cases we don't need to worry about, the 3rd one will fail because the server
cannot recognize the new enable field, the 4th will fail because the client cannot recognize
the new field, sounds like we only need to change the code to be able to ignore unknown field,
what's the reason of having OldServiceInstance?

> UnrecognizedPropertyException: "enabled" incompatibility
> --------------------------------------------------------
>                 Key: CURATOR-394
>                 URL:
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.12.0
>            Reporter: Gian Merlino
> When doing a rolling upgrade of our services from Curator 2.10.0 to Curator 2.12.0 we
noticed some of the non-upgraded services started throwing this error. The cause seems to
the combination of a new field added to ServiceInstance in CURATOR-275, and the lack of an
"ignore unknown properties" setting on the ObjectMapper used by Curator 2.10.0.
> This makes it so clients need to be upgraded before services. But if you have a cluster
where some services are also clients of other services (or of a service they are a part of)
then I don't see a way to do a rolling upgrade with the way things currently are. Whatever
instance you upgrade first will start announcing itself in a way that breaks instances running
the previous version of the code. This doesn't seem to be configurable either, so the new
"enabled" field can't be omitted from the serialized form.
> One possible solution is to revert CURATOR-275, add an "ignore unknown properties" to
the ObjectMapper, and then re-introduce CURATOR-275 in a future release. That'd create a "you
must go through release X first to upgrade to release Y" situation, but it would at least
make it possible to do rolling updates.
> Another possible solution is to accept that clients always need to be upgraded before
services, and accept that if you can't do this, it's impossible to update without downtime.
This seems like something that'd be good to avoid though.
> {code}
> 2017-03-23 16:22:35,652 [DruidTaskResolver[com.metamx.tranquility.druid.IndexService@37a0ec3c]]
WARN  c.m.t.finagle.DruidTaskResolver - Poll failed, trying again at[2017-03-23T16:23:10.899Z].
> Unrecognized field "enabled"
(Class org.apache.curator.x.discovery.ServiceInstance), not marked as ignorable
>  at [Source: [B@e9cde06; line: 1, column: 226] (through reference chain: org.apache.curator.x.discovery.ServiceInstance["enabled"])
>         at
>         at
>         at
>         at
>         at
>         at
>         at
>         at
>         at
>         at ~[org.codehaus.jackson.jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at org.apache.curator.x.discovery.details.JsonInstanceSerializer.deserialize(
>         at org.apache.curator.x.discovery.details.ServiceCacheImpl.addInstance(
>         at org.apache.curator.x.discovery.details.ServiceCacheImpl.start(
> {code}

This message was sent by Atlassian JIRA

View raw message