From d8e23d2c35f7acf466978de97dbfe8f57a0ff039 Mon Sep 17 00:00:00 2001 From: Albert Zaharovits Date: Wed, 1 Jan 2025 11:20:36 +0200 Subject: [PATCH] RestIndicesAction RestNodesAction --- .../rest/action/cat/RestIndicesAction.java | 16 ++++++++++++++++ .../rest/action/cat/RestNodesAction.java | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java b/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java index a968ea4520f40..84f0d1a531023 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java @@ -303,6 +303,15 @@ protected Table getTableWithHeader(final RestRequest request) { "sibling:pri;alias:iif,indexingIndexFailed;default:false;text-align:right;desc:number of failed indexing ops" ); table.addCell("pri.indexing.index_failed", "default:false;text-align:right;desc:number of failed indexing ops"); + table.addCell( + "indexing.index_failed_due_to_version_conflict", + "sibling:pri;alias:iifvc,indexingIndexFailedDueToVersionConflict;default:false;text-align:right;" + + "desc:number of failed indexing ops due to version conflict" + ); + table.addCell( + "pri.indexing.index_failed_due_to_version_conflict", + "default:false;text-align:right;desc:number of failed indexing ops due to version conflict" + ); table.addCell("merges.current", "sibling:pri;alias:mc,mergesCurrent;default:false;text-align:right;desc:number of current merges"); table.addCell("pri.merges.current", "default:false;text-align:right;desc:number of current merges"); @@ -670,6 +679,13 @@ Table buildTable( table.addCell(totalStats.getIndexing() == null ? null : totalStats.getIndexing().getTotal().getIndexFailedCount()); table.addCell(primaryStats.getIndexing() == null ? null : primaryStats.getIndexing().getTotal().getIndexFailedCount()); + table.addCell( + totalStats.getIndexing() == null ? null : totalStats.getIndexing().getTotal().getIndexFailedWithVersionConflictCount() + ); + table.addCell( + primaryStats.getIndexing() == null ? null : primaryStats.getIndexing().getTotal().getIndexFailedWithVersionConflictCount() + ); + table.addCell(totalStats.getMerge() == null ? null : totalStats.getMerge().getCurrent()); table.addCell(primaryStats.getMerge() == null ? null : primaryStats.getMerge().getCurrent()); diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java b/server/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java index 39e679f2c0ad0..c1aeacbee9bec 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java @@ -230,6 +230,11 @@ protected Table getTableWithHeader(final RestRequest request) { "indexing.index_failed", "alias:iif,indexingIndexFailed;default:false;text-align:right;desc:number of failed indexing ops" ); + table.addCell( + "indexing.index_failed_due_to_version_conflict", + "alias:iifvc,indexingIndexFailedDueToVersionConflict;default:false;text-align:right;" + + "desc:number of failed indexing ops due to version conflict" + ); table.addCell("merges.current", "alias:mc,mergesCurrent;default:false;text-align:right;desc:number of current merges"); table.addCell( @@ -466,6 +471,7 @@ Table buildTable( table.addCell(indexingStats == null ? null : indexingStats.getTotal().getIndexTime()); table.addCell(indexingStats == null ? null : indexingStats.getTotal().getIndexCount()); table.addCell(indexingStats == null ? null : indexingStats.getTotal().getIndexFailedCount()); + table.addCell(indexingStats == null ? null : indexingStats.getTotal().getIndexFailedWithVersionConflictCount()); MergeStats mergeStats = indicesStats == null ? null : indicesStats.getMerge(); table.addCell(mergeStats == null ? null : mergeStats.getCurrent());