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

Remove RestGetAllAliasesAction #31308

Merged

Conversation

javanna
Copy link
Member

@javanna javanna commented Jun 13, 2018

We currently have a specific REST action to retrieve all aliaes, which
uses internally the get index API. This doesn't seem to be required
anymore though as the existing RestGetAliaesAction could as well take
the requests with no indices and aliases specified.

This commit removes the RestGetAllAliasesAction in favour of using
RestGetAliasesAction also for requests that don't specify indices nor
aliases. Similar to #31129.

We currently have a specific REST action to retrieve all aliaes, which
uses internally the get index API. This doesn't seem to be required
anymore though as the existing RestGetAliaesAction could as well take
the requests with no indices and aliases specified.

This commit removes the RestGetAllAliasesAction in favour of using
RestGetAliasesAction also for requests that don't specify indices nor
aliases. Similar to elastic#31129.
@javanna javanna added >enhancement :Data Management/Indices APIs APIs to create and manage indices and templates v7.0.0 v6.4.0 labels Jun 13, 2018
@javanna javanna requested a review from dakrone June 13, 2018 18:49
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Copy link
Contributor

@s1monw s1monw left a comment

Choose a reason for hiding this comment

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

LGTM

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, thanks Luca!

@javanna javanna merged commit ce245a7 into elastic:master Jun 14, 2018
jasontedor added a commit to majormoses/elasticsearch that referenced this pull request Jun 14, 2018
* elastic/master:
  More detailed tracing when writing metadata (elastic#31319)
  [Tests] Mutualize fixtures code in BaseHttpFixture (elastic#31210)
  Remove RestGetAllAliasesAction (elastic#31308)
  Temporary fix for broken build
  Reenable Checkstyle's unused import rule (elastic#31270)
  Remove remaining unused imports before merging elastic#31270
  Fix non-REST doc snippet
dnhatn added a commit that referenced this pull request Jun 14, 2018
* master:
  Remove RestGetAllAliasesAction (#31308)
  Temporary fix for broken build
  Reenable Checkstyle's unused import rule (#31270)
  Remove remaining unused imports before merging #31270
  Fix non-REST doc snippet
  [DOC] Extend SQL docs
  Immediately flush channel after writing to buffer (#31301)
  [DOCS] Shortens ML API intros
  Use quotes in the call invocation (#31249)
  move security ingest processors to a sub ingest directory (#31306)
  Add 5.6.11 version constant.
  Fix version detection.
  SQL: Whitelist SQL utility class for better scripting (#30681)
  [Docs] All Rollup docs experimental, agg limitations, clarify DeleteJob (#31299)
  CCS: don't proxy requests for already connected node (#31273)
  Mute ScriptedMetricAggregatorTests testSelfReferencingAggStateAfterMap
  [test] opensuse packaging turn up debug logging
  Add unreleased version 6.3.1
  Removes experimental tag from scripted_metric aggregation (#31298)
  [Rollup] Metric config parser must use builder so validation runs (#31159)
  [ML] Check licence when datafeeds use cross cluster search  (#31247)
  Add notion of internal index settings (#31286)
  Test: Remove broken yml test feature (#31255)
  REST hl client: cluster health to default to cluster level (#31268)
  [ML] Update test thresholds to account for changes to memory control (#31289)
  Log warnings when cluster state publication failed to some nodes (#31233)
  Fix AntFixture waiting condition (#31272)
  Ignore numeric shard count if waiting for ALL (#31265)
  [ML] Implement new rules design (#31110)
  index_prefixes back-compat should test 6.3 (#30951)
  Core: Remove plain execute method on TransportAction (#30998)
  Update checkstyle to 8.10.1 (#31269)
  Set analyzer version in PreBuiltAnalyzerProviderFactory (#31202)
  Modify pipelining handlers to require full requests (#31280)
  Revert upgrade to Netty 4.1.25.Final (#31282)
  Use armored input stream for reading public key (#31229)
  Fix Netty 4 Server Transport tests. Again.
  REST hl client: adjust wait_for_active_shards param in cluster health (#31266)
  REST high-level Client: remove deprecated API methods (#31200)
  [DOCS] Mark SQL feature as experimental
  [DOCS] Updates machine learning custom URL screenshots (#31222)
  Fix naming conventions check for XPackTestCase
  Fix security Netty 4 transport tests
  Fix race in clear scroll (#31259)
  [DOCS] Clarify audit index settings when remote indexing (#30923)
  Delete typos in SAML docs (#31199)
  REST high-level client: add Cluster Health API (#29331)
  [ML][TEST] Mute tests using rules (#31204)
  Support RequestedAuthnContext (#31238)
  SyncedFlushResponse to implement ToXContentObject (#31155)
  Add Get Aliases API to the high-level REST client (#28799)
  Remove some line length supressions (#31209)
  Validate xContentType in PutWatchRequest. (#31088)
  [INGEST] Interrupt the current thread if evaluation grok expressions take too long (#31024)
  Suppress extras FS on caching directory tests
  Revert "[DOCS] Added 6.3 info & updated the upgrade table. (#30940)"
  Revert "Fix snippets in upgrade docs"
  Fix snippets in upgrade docs
  [DOCS] Added 6.3 info & updated the upgrade table. (#30940)
  LLClient: Support host selection (#30523)
  Upgrade to Netty 4.1.25.Final (#31232)
  Enable custom credentials for core REST tests (#31235)
  Move ESIndexLevelReplicationTestCase to test framework (#31243)
  Encapsulate Translog in Engine (#31220)
  HLRest: Add get index templates API (#31161)
  Remove all unused imports and fix CRLF (#31207)
  [Tests] Fix self-referencing tests
  [TEST] Fix testRecoveryAfterPrimaryPromotion
  [Docs] Remove mention pattern files in Grok processor (#31170)
  Use stronger write-once semantics for Azure repository (#30437)
  Don't swallow exceptions on replication (#31179)
  Limit the number of concurrent requests per node (#31206)
  Call ensureNoSelfReferences() on _agg state variable after scripted metric agg script executions (#31044)
  Move java version checker back to its own jar (#30708)
  [test] add fix for rare virtualbox error (#31212)
javanna added a commit that referenced this pull request Jun 15, 2018
We currently have a specific REST action to retrieve all aliaes, which
uses internally the get index API. This doesn't seem to be required
anymore though as the existing RestGetAliaesAction could as well take
the requests with no indices and aliases specified.

This commit removes the RestGetAllAliasesAction in favour of using
RestGetAliasesAction also for requests that don't specify indices nor
aliases. Similar to #31129.
dnhatn added a commit that referenced this pull request Jun 15, 2018
* 6.x:
  Upgrade to Lucene-7.4.0-snapshot-518d303506 (#31360)
  [ML] Implement new rules design (#31110) (#31294)
  Remove RestGetAllAliasesAction (#31308)
  CCS: don't proxy requests for already connected node (#31273)
  Rankeval: Fold template test project into main module (#31203)
  [Docs] Remove reference to repository-s3 plugin creating an S3 bucket (#31359)
  More detailed tracing when writing metadata (#31319)
  Add details section for dcg ranking metric (#31177)
javanna added a commit to javanna/elasticsearch that referenced this pull request Jun 18, 2018
Some recent failures on the mixed cluster tests were caused by elastic#31308.
Instead of executing get index API when calling GET /_alias we now go
through the get alias API. The behaviour of such API is slightly
different on 5.6 compared to 6.x and master as to whether indices that
have no aliases are returned or not. In fact elastic#25114 was not backported
to 5.6.

When the 5.6 node is the elected master, if the get alias API goes
through such node or another 5.x node, the get index API will be used
internally and all tests are fine. If some 6.x node is hit though by the
client request, we will go through the get alias API, but we will do it
through the elected master which will not return indices without aliases
(at transport, see MetaData#findAliases on 5.6). That means that in a
mixed cluster this API will return a different result depending on which
node is the elected master and which one is hit by the request.
javanna added a commit that referenced this pull request Jun 19, 2018
Some recent failures on the mixed cluster tests were caused by #31308.
Instead of executing get index API when calling GET /_alias we now go
through the get alias API. The behaviour of such API is slightly
different on 5.6 compared to 6.x and master as to whether indices that
have no aliases are returned or not. In fact #25114 was not backported
to 5.6.

When the 5.6 node is the elected master, if the get alias API goes
through such node or another 5.x node, the get index API will be used
internally and all tests are fine. If some 6.x node is hit though by the
client request, we will go through the get alias API, but we will do it
through the elected master which will not return indices without aliases
(at transport, see MetaData#findAliases on 5.6). That means that in a
mixed cluster this API will return a different result depending on which
node is the elected master and which one is hit by the request.
javanna added a commit that referenced this pull request Jun 26, 2018
@javanna javanna removed the v6.4.0 label Jun 26, 2018
@javanna
Copy link
Member Author

javanna commented Jun 26, 2018

This change was reverted in 6.x as it caused a breakage when the security plugin is installed, see #31516

dnhatn added a commit that referenced this pull request Jun 26, 2018
* 6.x:
  Fix broken backport of #31578 by adjusting constructor (#31587)
  ingest: Add ignore_missing property to foreach filter (#22147) (#31578)
  Add package pre-install check for java binary (#31343)
  Docs: Clarify sensitive fields watcher encryption (#31551)
  Watcher: Remove never executed code (#31135)
  Improve test times for tests using `RandomObjects::addFields` (#31556)
  Revert "Remove RestGetAllAliasesAction (#31308)"
  REST high-level client: add simulate pipeline API (#31158)
  Get Mapping API to honour allow_no_indices and ignore_unavailable (#31507)
  Fix Mockito trying to mock IOException that isn't thrown by method (#31433) (#31527)
  [Test] Add full cluster restart test for Rollup (#31533)
  Enhance thread context uniqueness assertion
  fix writeIndex evaluation for aliases (#31562)
  Add x-opaque-id to search slow logs (#31539)
  Watcher: Fix put watch action (#31524)
  [DOCS] Significantly improve SQL docs
  turn GetFieldMappingsResponse to ToXContentObject (#31544)
  TEST: Unmute testHistoryUUIDIsGenerated
  Ingest Attachment: Upgrade Tika to 1.18 (#31252)
  TEST: Correct the assertion arguments order (#31540)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants