Skip to content

Conversation

@csoulios
Copy link
Contributor

@csoulios csoulios commented Mar 3, 2021

This PR moves field related rollup metadata from the index metadata to the field mapping metadata.

  • date_histogram fields is moved to the timestamp field (fields are fixed_interval or calendar_interval, time_zone)
  • histogram fields are moved to the numeric field on which the the histogram is computed (the field is named interval)

Also, the index uuid has been added to the index rollup settings as index.rollup.source.uuid and index.rollup.source.name

The rest of the RollupMetadata has been removed. Finally, no rollup metadata exists in the global cluster state

csoulios added 2 commits March 3, 2021 21:06
Also, added source index uuid in the rollup index metadata.
Removed rollup group and rollup metadata as they are not used any more.
@csoulios csoulios added >non-issue :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data v8.0.0 v7.13.0 labels Mar 3, 2021
@csoulios csoulios requested review from jimczi and talevy March 3, 2021 19:44
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 3, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@csoulios csoulios changed the title Move rollup metadata to field mappings [RollupV2] Move rollup metadata to field mappings Mar 3, 2021
Copy link
Contributor

@talevy talevy left a comment

Choose a reason for hiding this comment

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

I'm glad to see this change come in! I think it is great to leverage the mapping metadata to hold this information.

@csoulios csoulios requested a review from not-napoleon March 4, 2021 16:33
@csoulios csoulios requested a review from talevy March 8, 2021 22:09
Copy link
Contributor

@talevy talevy left a comment

Choose a reason for hiding this comment

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

I left some additional comments

@csoulios
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/1
@elasticmachine run elasticsearch-ci/packaging-sample-unix

@csoulios csoulios requested a review from talevy March 10, 2021 17:32
Copy link
Contributor

@talevy talevy left a comment

Choose a reason for hiding this comment

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

Left one testing comment, but no need to iterate. LGTM

return response;
}

private void assertRollupIndex(RollupActionConfig config) {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe this method should be removed and replaced with direct calls to assertRollupIndex(config, index, rollupIndex) so things are more explicit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks a lot for the feedback and all the help.

I am removing assertRollupIndex(RollupActionConfig config) and also rollup(RollupActionConfig config)

@csoulios
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/bwc

@csoulios csoulios merged commit cdb302c into elastic:master Mar 11, 2021
@csoulios csoulios deleted the rollupv2-meta-refactor branch March 11, 2021 09:30
probakowski pushed a commit to probakowski/elasticsearch that referenced this pull request Mar 15, 2021
This PR moves field related rollup metadata from the index metadata to the field mapping metadata.

- date_histogram fields is moved to the timestamp field 
     (fields are fixed_interval or calendar_interval, time_zone)
- histogram fields are moved to the numeric field on which the the histogram is computed 
     (the field is named interval)

Also, the index uuid has been added to the index rollup settings as index.rollup.source.uuid 
and index.rollup.source.name

The rest of the RollupMetadata has been removed and no rollup metadata exists in the global 
cluster state.

Co-authored-by: Tal Levy <[email protected]>
csoulios added a commit that referenced this pull request Mar 22, 2021
Backports #69921 to 7.x

    This PR moves field related rollup metadata from the index metadata to the field mapping metadata.

    date_histogram fields is moved to the timestamp field (fields are fixed_interval or calendar_interval, time_zone)
    histogram fields are moved to the numeric field on which the the histogram is computed (the field is named interval)

    Also, the index uuid has been added to the index rollup settings as index.rollup.source.uuid and index.rollup.source.name

    The rest of the RollupMetadata has been removed. Finally, no rollup metadata exists in the global cluster state

Co-authored-by: Tal Levy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v7.13.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants