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

Expose retention leases in shard stats #37991

Merged
merged 14 commits into from
Jan 30, 2019

Conversation

jasontedor
Copy link
Member

This commit exposes retention leases via shard-level stats.

Relates #37165

This commit exposes retention leases via shard-level stats.
@jasontedor jasontedor added >enhancement v7.0.0 :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. :Data Management/ILM+SLM Index and Snapshot lifecycle management v6.7.0 labels Jan 29, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@jasontedor jasontedor mentioned this pull request Jan 29, 2019
24 tasks
@jasontedor
Copy link
Member Author

I will add some tests for this later, but I want to get this up for early feedback and so that ILM can provide feedback and get unblocked.

@jasontedor
Copy link
Member Author

@elasticmachine run elasticsearch-ci/1

@gwbrown
Copy link
Contributor

gwbrown commented Jan 29, 2019

Thank you, @jasontedor!

I'd like @martijnvg to also confirm as he's more familiar with CCR, but it looks like this (in combination with the SeqNoStats) does get us the information we need in order to determine if we can safely perform operations on a leader index.

@martijnvg
Copy link
Member

@jasontedor So in ILM we would do something like this to figure out whether an index is a ccr leader index?

boolean waitWithNextStep = retentionLeaseStatsForIndex.getLeases()
   .stream().
   .filter(lease -> "ccr".equals(lease.source()))
   .findAny()

@jasontedor
Copy link
Member Author

@martijnvg Yes, so we are missing a getter on the stats object.

@martijnvg
Copy link
Member

@jasontedor Cool. This approach looks good to me.

* master: (29 commits)
  Fix limit on retaining sequence number (elastic#37992)
  Docs test fix, wait for shards active.
  Revert "Revert "Documented default values for index follow request parameters. (elastic#37917)""
  Revert "Documented default values for index follow request parameters. (elastic#37917)"
  Ensure date parsing BWC compatibility (elastic#37929)
  SQL: Skip the nested and object field types in case of an ODBC request (elastic#37948)
  Use mappings to format doc-value fields by default. (elastic#30831)
  Give precedence to index creation when mixing typed templates with typeless index creation and vice-versa. (elastic#37871)
  Add classifier to tar.gz in docker compose (elastic#38011)
  Documented default values for index follow request parameters. (elastic#37917)
  Fix fetch source option in expand search phase (elastic#37908)
  Restore a noop _all metadata field for 6x indices (elastic#37808)
  Added ccr to xpack usage infrastructure (elastic#37256)
  Fix exit code for Security CLI tools  (elastic#37956)
  Streamline S3 Repository- and Client-Settings (elastic#37393)
  Add version 6.6.1 (elastic#37975)
  Ensure task metadata not null in follow test (elastic#37993)
  Docs fix - missing callout
  Types removal - deprecate include_type_name with index templates (elastic#37484)
  Handle completion suggestion without contexts
  ...
Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

Thanks. I've left two smaller comments

@jasontedor
Copy link
Member Author

@ywelsch Thanks for the feedback; I have responded to it.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

Left some testing nits. LGTM

@jasontedor jasontedor merged commit 6500b0c into elastic:master Jan 30, 2019
jasontedor added a commit to dnhatn/elasticsearch that referenced this pull request Jan 30, 2019
* master:
  Expose retention leases in shard stats (elastic#37991)
  Make primary terms fields private in index shard (elastic#38036)
  ML: Add reason field in JobTaskState (elastic#38029)
  Log flush_stats and commit_stats in testMaybeFlush
  HLRC: Fix strict setting exception handling (elastic#37247)
  Test: Enable strict deprecation on all tests (elastic#36558)
  Removes typed calls from YAML REST tests (elastic#37611)
  Switch default time format for ingest from Joda to Java for v7 (elastic#37934)
  Remove deprecated Plugin#onModule extension points (elastic#37866)
  Geo: Fix Empty Geometry Collection Handling (elastic#37978)
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jan 30, 2019
* master:
  Remove types from watcher docs (elastic#38002)
  Add test coverage for Painless general casting of boolean and Boolean (elastic#37780)
  Fixed test bug, lastFollowTime is null if there are no follower indices.
  Add ECS schema for user-agent ingest processor (elastic#37727) (elastic#37984)
  Extract TransportRequestDeduplication from ShardStateAction (elastic#37870)
  Expose retention leases in shard stats (elastic#37991)
jasontedor added a commit that referenced this pull request Jan 30, 2019
This commit exposes retention leases via shard-level stats.
@danielmitterdorfer danielmitterdorfer removed the :Data Management/ILM+SLM Index and Snapshot lifecycle management label Feb 8, 2019
@jasontedor jasontedor deleted the retention-lease-stats branch February 12, 2019 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. >enhancement v6.7.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants