Skip to content

Revert "Index stats enhancement: creation date and tier_preference (#116339)"#116959

Merged
DaveCTurner merged 2 commits intoelastic:mainfrom
DaveCTurner:2024/11/18/revert-116339
Nov 18, 2024
Merged

Revert "Index stats enhancement: creation date and tier_preference (#116339)"#116959
DaveCTurner merged 2 commits intoelastic:mainfrom
DaveCTurner:2024/11/18/revert-116339

Conversation

@DaveCTurner
Copy link
Contributor

This reverts commit e0af123.

@DaveCTurner DaveCTurner added >non-issue :Core/Infra/Stats Statistics tracking and retrieval APIs v9.0.0 labels Nov 18, 2024
@DaveCTurner DaveCTurner requested a review from dakrone November 18, 2024 15:41
@elasticsearchmachine elasticsearchmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Nov 18, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Comment on lines -240 to -245
if (indexStats.getTierPreference() != null) {
builder.field("tier_preference", indexStats.getTierPreference());
}
if (indexStats.getCreationDate() != null) {
builder.field("creation_date", indexStats.getCreationDate());
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe this is ok, I don't think any clients could have been expecting these fields yet and they were optional anyway so we can remove them without ceremony.

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, how will we eventually be able to remove the serialization?

Comment on lines +193 to +194
out.writeMap(Map.of(), StreamOutput::writeStringCollection);
out.writeMap(Map.of(), StreamOutput::writeLong);
Copy link
Member

Choose a reason for hiding this comment

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

Should we add some kind of check to be able to eventually remove these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah eventually all these transport versions get collapsed into a release-version-named one (see e.g. org.elasticsearch.TransportVersions#V_8_15_2) and then this branch will be dead code:

        if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_16_x)) {
            indexHealthMap = in.readMap(ClusterHealthStatus::readFrom);
            indexStateMap = in.readMap(IndexMetadata.State::readFrom);
        } else if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_16_x)) {
            // same condition as the previous if so cannot get here

@DaveCTurner DaveCTurner enabled auto-merge (squash) November 18, 2024 15:51
@DaveCTurner DaveCTurner merged commit c72d5fd into elastic:main Nov 18, 2024
@DaveCTurner DaveCTurner deleted the 2024/11/18/revert-116339 branch November 18, 2024 16:48
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Nov 20, 2024
alexey-ivanov-es pushed a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Stats Statistics tracking and retrieval APIs >non-issue Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants