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

[TSDB] Rename rollup public API to downsample #89809

Merged
merged 11 commits into from
Sep 7, 2022

Conversation

csoulios
Copy link
Contributor

@csoulios csoulios commented Sep 5, 2022

This PR renames all public APIs for downsampling so that they contain the downsample keyword instead of the rollup that we had until now.

  1. The API endpoint for the downsampling action is renamed to:
/source-index/_downsample/target-index
  1. The ILM action is renamed to
PUT _ilm/policy/my_policy
{
  "policy": {
    "phases": {
      "warm": {
        "actions": {
          "downsample": {
  	    "fixed_interval": "24h"
  	  }
  	}
      }
    }
  }
}
  1. unsupported_aggregation_on_rollup_index was renamed to unsupported_aggregation_on_downsampled_index

  2. Internal trasport actions were renamed:

  • indices:admin/xpack/rollup -> indices:admin/xpack/downsample
  • indices:admin/xpack/rollup_indexer -> indices:admin/xpack/downsample_indexer
  1. Renamed the following index settings:
  • index.rollup.source.uuid -> index.downsample.source.uuid
  • index.rollup.source.name -> index.downsample.source.name
  • index.rollup.status -> index.downsample.status

Finally, we renamed many internal variables and classes from *Rollup* to *Downsample*. However, this effort will be completed in more than one PRs so that we minimize conflicts with other in-flight PRs.

Relates to #74660

@csoulios csoulios added >non-issue :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data v8.5.0 labels Sep 5, 2022
@csoulios csoulios added the Team:Clients Meta label for clients team label Sep 6, 2022
@csoulios
Copy link
Contributor Author

csoulios commented Sep 6, 2022

cc @ghudgins @Dosant @flash1293 @salvatore-campagna
cc @elastic/es-clients

@salvatore-campagna
Copy link
Contributor

Change of unsupported_aggregation_on_rollup_index might break Kibana integration. Maybe this is not an issue if the Kibana feature is still in development.

@csoulios
Copy link
Contributor Author

csoulios commented Sep 6, 2022

Change of unsupported_aggregation_on_rollup_index might break Kibana integration. Maybe this is not an issue if the Kibana feature is still in development.

Thanks for the feedback, Salvatore. I have already discussed this with @flash1293 and we have agreed Kibana will change this as soon as this PR is merged.

@flash1293
Copy link
Contributor

We are aware - this integration is still on a PR so no worries.

@csoulios csoulios marked this pull request as ready for review September 6, 2022 18:08
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) and removed Team:Clients Meta label for clients team labels Sep 6, 2022
@elasticsearchmachine
Copy link
Collaborator

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

@@ -1,8 +1,8 @@
{
"rollup.rollup":{
"downsample.downsample":{
Copy link
Member

Choose a reason for hiding this comment

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

What does this do to our client friends?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clients should probably be modified so that they invokes the downsample endpoint.

I have already tagged the @elastic/es-clients team in this PR. I will reach out to them and give them a heads up about this change.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the only API rename is rollup.rollup into downsample.downsample this should not be an issue since this API is experimental and we can have BC break.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ezimuel thanks for confirming. The detailed list of changes introduced can be found in the description of this PR. Regarding the API this is the only change.

public static final String NAME = "indices:admin/xpack/rollup";
public class DownsampleAction extends ActionType<AcknowledgedResponse> {
public static final DownsampleAction INSTANCE = new DownsampleAction();
public static final String NAME = "indices:admin/xpack/downsample";
Copy link
Member

Choose a reason for hiding this comment

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

Will this break the mixed cluster case? That's fine for the unreleased downsample stuff but not for the old rollup code I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Old rollup code is behind a feature flag and has not been released. We will probably need to bump up the supported versions to 8.5.0 for those tests.

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

  • We're removing the rollup.rollup API which is experimental but has been around for a year. Do we know this API isn't being used often so a direct removal without deprecation is acceptable?
  • We're creating a new namespace here "downsample" which we try to only do if there's a good reason. Do we see more APIs being added to this namespace that don't match other existing namespaces? My initial thought for an existing alternative would be indices.downsample?

@csoulios
Copy link
Contributor Author

csoulios commented Sep 7, 2022

@sethmlarson Thank you for the feedback.

We're removing the rollup.rollup API which is experimental but has been around for a year. Do we know this API isn't being used often so a direct removal without deprecation is acceptable?

This API is not used because it has always been hidden behind a feature flag. It is safe to directly remove it.

We're creating a new namespace here "downsample" which we try to only do if there's a good reason. Do we see more APIs being added to this namespace that don't match other existing namespaces? My initial thought for an existing alternative would be indices.downsample?

This is an excellent catch. I will change it to indices.downsample so that we don't create a separate namespace for it.
Update: Implemented this in ac960eb

@csoulios csoulios merged commit f8d1d2a into elastic:main Sep 7, 2022
@csoulios csoulios deleted the rollups-rename branch September 7, 2022 16:23
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Sep 8, 2022
* main: (175 commits)
  Fix integration test on Windows (elastic#89894)
  Avoiding the use of dynamic map keys in the cluster_formation results of the stable master health indicator (elastic#89842)
  Mute org.elasticsearch.tracing.apm.ApmIT.testCapturesTracesForHttpTraffic (elastic#89891)
  Fix typos in audit event types (elastic#89886)
  Synthetic _source: support histogram field (elastic#89833)
  [TSDB] Rename rollup public API to downsample  (elastic#89809)
  Format script values access (elastic#89780)
  [DOCS] Simplifies composite aggregation recommendation (elastic#89878)
  [DOCS] Update CCS compatibility matrix for 8.3 (elastic#88906)
  Fix memory leak when double invoking RestChannel.sendResponse (elastic#89873)
  [ML] Add processor autoscaling decider (elastic#89645)
  Update disk-usage.asciidoc (elastic#89709) (elastic#89874)
  Add allocation deciders in createComponents (elastic#89836)
  Mute flaky H3LatLonGeometryTest.testIndexPoints (elastic#89870)
  Fix typo in get-snapshot-status-api doc (elastic#89865)
  Picking master eligible node at random in the master stability health indicator (elastic#89841)
  Do not reuse the client after a disruption elastic#89815 (elastic#89866)
  [ML] Distribute trained model allocations across availability zones (elastic#89822)
  Increment clientCalledCount before onResponse (elastic#89858)
  AwaitsFix for elastic#89867
  ...
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Sep 8, 2022
* main: (175 commits)
  Fix integration test on Windows (elastic#89894)
  Avoiding the use of dynamic map keys in the cluster_formation results of the stable master health indicator (elastic#89842)
  Mute org.elasticsearch.tracing.apm.ApmIT.testCapturesTracesForHttpTraffic (elastic#89891)
  Fix typos in audit event types (elastic#89886)
  Synthetic _source: support histogram field (elastic#89833)
  [TSDB] Rename rollup public API to downsample  (elastic#89809)
  Format script values access (elastic#89780)
  [DOCS] Simplifies composite aggregation recommendation (elastic#89878)
  [DOCS] Update CCS compatibility matrix for 8.3 (elastic#88906)
  Fix memory leak when double invoking RestChannel.sendResponse (elastic#89873)
  [ML] Add processor autoscaling decider (elastic#89645)
  Update disk-usage.asciidoc (elastic#89709) (elastic#89874)
  Add allocation deciders in createComponents (elastic#89836)
  Mute flaky H3LatLonGeometryTest.testIndexPoints (elastic#89870)
  Fix typo in get-snapshot-status-api doc (elastic#89865)
  Picking master eligible node at random in the master stability health indicator (elastic#89841)
  Do not reuse the client after a disruption elastic#89815 (elastic#89866)
  [ML] Distribute trained model allocations across availability zones (elastic#89822)
  Increment clientCalledCount before onResponse (elastic#89858)
  AwaitsFix for elastic#89867
  ...

# Conflicts:
#	x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/downsample/RollupShardIndexer.java
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Sep 8, 2022
* main: (283 commits)
  Fix integration test on Windows (elastic#89894)
  Avoiding the use of dynamic map keys in the cluster_formation results of the stable master health indicator (elastic#89842)
  Mute org.elasticsearch.tracing.apm.ApmIT.testCapturesTracesForHttpTraffic (elastic#89891)
  Fix typos in audit event types (elastic#89886)
  Synthetic _source: support histogram field (elastic#89833)
  [TSDB] Rename rollup public API to downsample  (elastic#89809)
  Format script values access (elastic#89780)
  [DOCS] Simplifies composite aggregation recommendation (elastic#89878)
  [DOCS] Update CCS compatibility matrix for 8.3 (elastic#88906)
  Fix memory leak when double invoking RestChannel.sendResponse (elastic#89873)
  [ML] Add processor autoscaling decider (elastic#89645)
  Update disk-usage.asciidoc (elastic#89709) (elastic#89874)
  Add allocation deciders in createComponents (elastic#89836)
  Mute flaky H3LatLonGeometryTest.testIndexPoints (elastic#89870)
  Fix typo in get-snapshot-status-api doc (elastic#89865)
  Picking master eligible node at random in the master stability health indicator (elastic#89841)
  Do not reuse the client after a disruption elastic#89815 (elastic#89866)
  [ML] Distribute trained model allocations across availability zones (elastic#89822)
  Increment clientCalledCount before onResponse (elastic#89858)
  AwaitsFix for elastic#89867
  ...
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) v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants