Skip to content

Conversation

albertzaharovits
Copy link
Contributor

@albertzaharovits albertzaharovits commented Dec 19, 2024

This exposes new OTel node and index based metrics for indexing failures due to version conflicts.

In addition, the /_cat/shards, /_cat/indices and /_cat/nodes APIs also expose the same metric, under the newly added column iifvc.

Relates: #107601

@albertzaharovits albertzaharovits changed the title Indexing mertrics for version conflicts Indexing metrics for version conflicts Dec 19, 2024
@kingherc
Copy link
Contributor

kingherc commented Jan 7, 2025

@albertzaharovits please tell me when this is ready for review again, thanks!

@elasticsearchmachine
Copy link
Collaborator

Hi @albertzaharovits, I've created a changelog YAML for you.

@albertzaharovits
Copy link
Contributor Author

@kingherc this is now ready for another round.

Copy link
Contributor

@kingherc kingherc left a comment

Choose a reason for hiding this comment

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

Better add auto-backport label to PR.

LGTM, much cleaner!

{
var e = expectThrows(
VersionConflictEngineException.class,
() -> client(dataNode).index(new IndexRequest("test").id(docId).source(Map.of()).setIfSeqNo(1).setIfPrimaryTerm(1))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this because the seqno is 0 for the document?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

@albertzaharovits albertzaharovits added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) auto-backport Automatically create backport pull requests when merged and removed auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Jan 8, 2025
@albertzaharovits albertzaharovits enabled auto-merge (squash) January 8, 2025 09:55
@albertzaharovits albertzaharovits merged commit 12eb1cf into elastic:main Jan 8, 2025
15 of 16 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 119067

@albertzaharovits
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Questions ?

Please refer to the Backport tool documentation

@albertzaharovits albertzaharovits deleted the index-metrics-version-conflicts branch January 8, 2025 14:28
albertzaharovits added a commit to albertzaharovits/elasticsearch that referenced this pull request Jan 8, 2025
This exposes new OTel node and index based metrics for indexing failures due to version conflicts.

In addition, the /_cat/shards, /_cat/indices and /_cat/nodes APIs also expose the same metric, under the newly added column iifvc.

Relates: elastic#107601
(cherry picked from commit 12eb1cf)

# Conflicts:
#	server/src/main/java/org/elasticsearch/TransportVersions.java
elasticsearchmachine pushed a commit that referenced this pull request Jan 9, 2025
#119761)

* Metrics for indexing failures due to version conflicts (#119067)

This exposes new OTel node and index based metrics for indexing failures due to version conflicts.

In addition, the /_cat/shards, /_cat/indices and /_cat/nodes APIs also expose the same metric, under the newly added column iifvc.

Relates: #107601
(cherry picked from commit 12eb1cf)

# Conflicts:
#	server/src/main/java/org/elasticsearch/TransportVersions.java

* types

* Fix NodeIndexingMetricsIT

* [CI] Auto commit changes from spotless

* Fix RestShardsActionTests

* Fix test/cat.shards/10_basic.yml for bwc

---------

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

Labels

auto-backport Automatically create backport pull requests when merged :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >feature Team:Distributed Indexing Meta label for Distributed Indexing team v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants