Skip to content
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

fix: change int type to long #489

Conversation

szczepanczykd
Copy link
Collaborator

@szczepanczykd szczepanczykd commented May 20, 2023

Description

The server returns long instead of int:
https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/index/store/StoreStats.java

Issues Resolved

#184
#490

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
@szczepanczykd szczepanczykd changed the title fix: change int type to long WIP: fix: change int type to long May 20, 2023
Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
@szczepanczykd szczepanczykd changed the title WIP: fix: change int type to long fix: change int type to long May 20, 2023

@Nullable
private final String totalDataSetSize;

@Nullable
private final Integer totalDataSetSizeInBytes;
private final Long totalDataSetSizeInBytes;
Copy link
Collaborator Author

@szczepanczykd szczepanczykd May 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this field in the response from API in version 2.7.0
image

Seems like it was never produced by the server, even from very first version:
https://github.com/opensearch-project/OpenSearch/blob/1.0/server/src/main/java/org/opensearch/index/store/StoreStats.java

Should I remove it or mark it as @deprecated?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark it as deprecated, will remove in the next major version.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in: #497 :)

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Make a separate PR for the deprecated field so we have a single link for that one.

@szczepanczykd szczepanczykd merged commit 95969db into opensearch-project:main May 23, 2023
szczepanczykd added a commit to szczepanczykd/opensearch-java that referenced this pull request May 23, 2023
* fix: change int type to long

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

* update CHANGELOG.md

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

* fix: change totalDataSetSizeInBytes to Long too

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

* fix: skip removing opensearch-observability index in AfterTest cleanup

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

---------

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
dblock pushed a commit that referenced this pull request May 23, 2023
* fix: handle String error deserialization for ErrorCause object (#301) (#476)

* fix: handle String error deserialization for ErrorCause object (#301)

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

* update CHANGELOG.md

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

---------

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

* fix: change int type to long (#489)

* fix: change int type to long

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

* update CHANGELOG.md

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

* fix: change totalDataSetSizeInBytes to Long too

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

* fix: skip removing opensearch-observability index in AfterTest cleanup

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

---------

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>

---------

Signed-off-by: Dominik Szczepanczyk <szczepanczyk.dominik@gmail.com>
@szczepanczykd szczepanczykd deleted the feature/fix_store_stats_out_of_range_value branch June 3, 2023 04:43
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.

3 participants