Skip to content

Add custom converter for UpgradeStatusResponse #1461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2015

Conversation

gmarz
Copy link
Contributor

@gmarz gmarz commented Jun 19, 2015

The _upgrade response has changed in ES 1.6. This commit adds a custom
JSON converter in order to support the ES <= 1.5 response as well as the
newer 1.6 response.

ES <= 1.5.x

{
   "nest_test_data-11800": {
      "size_in_bytes": 153183,
      "size_to_upgrade_in_bytes": 0
   }
}

versus

ES 1.6

{
   "size_in_bytes": 153218,
   "size_to_upgrade_in_bytes": 0,
   "size_to_upgrade_ancient_in_bytes": 0,
   "indices": {
      "nest_test_data-10872": {
         "size_in_bytes": 153218,
         "size_to_upgrade_in_bytes": 0,
         "size_to_upgrade_ancient_in_bytes": 0
      }
   }
}

I hate writing code like this, and adding another custom converter, but I don't see another way around it for now. Please review @Mpdreamz.

The _upgrade response has changed in ES 1.6.  This commit adds a custom
JSON converter in order to support the ES <= 1.5 response as well as the
newer 1.6 response.
@gmarz gmarz added the v1.6.0 label Jun 19, 2015
Mpdreamz added a commit that referenced this pull request Jun 19, 2015
Add custom converter for UpgradeStatusResponse
@Mpdreamz Mpdreamz merged commit 9ae56fd into develop Jun 19, 2015
@Mpdreamz Mpdreamz deleted the fix/upgrade-status-response branch June 19, 2015 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants