[ 
https://issues.apache.org/jira/browse/IGNITE-29236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ilya Shishkov updated IGNITE-29236:
-----------------------------------
    Description: 
h3. Problem

The 
[Metrics|https://ignite.apache.org/docs/ignite2/latest/monitoring-metrics/new-metrics]
 page
({{docs/_docs/monitoring-metrics/new-metrics.adoc}}) mostly matches the metrics 
published by a node. It doesn't match
in the following places:

* *Sorted Indexes Operations* 
({{index.\{schema_name\}.\{table_name\}.\{index_name\}}}): the table contains 
only
  the templates {{\{opType\}Count}} and {{\{opType\}Time}}, and the text names 
5 of the 11 operations. A node actually
  publishes 22 metrics: {{AskNeighbor}}, {{Insert}}, 
{{LockBackAndRmvFromLeaf}}, {{LockBackAndTail}}, {{LockTail}},
  {{LockTailExact}}, {{LockTailForward}}, {{RemoveFromLeaf}}, 
{{RemoveRangeFromLeaf}}, {{Replace}}, {{Search}}, each
  with the {{Count}} and {{Time}} suffixes.
* *Discovery IO* ({{io.discovery}}): only {{TcpDiscoverySpi}} metrics are 
described. With {{ZookeeperDiscoverySpi}}
  the register contains a different set: {{CommunicationErrors}}, 
{{Coordinator}}, {{CurrentTopologyVersion}},
  {{FailedNodes}}, {{JoinedNodes}}, {{LeftNodes}}. {{CommunicationErrors}} 
isn't documented at all, and the counters
  are {{long}}, not {{integer}} as for TCP discovery 
({{ZookeeperDiscoveryStatistics}}, 
{{ZookeeperDiscoverySpi#onContextInitialized0}}).
* The page doesn't say which metrics and registers exist on server nodes only:
** {{cacheGroups.\{group_name\}}}: {{InMemoryIndexPages}} and 
{{TotalAllocatedPages}} are not registered on client
   nodes (no data region, {{CacheGroupMetricsImpl}}).
** {{rest.client}}: on client nodes the register exists only with 
{{IGNITE_REST_START_ON_CLIENT=true}}
   ({{GridRestProcessor}}).
** {{snapshot}}, {{snapshot.incremental}}, {{snapshot-restore}}, 
{{snapshot-check.\{snapshot_name\}}}: server nodes
   only ({{IgniteSnapshotManager#start0}} exits on client nodes).
** {{index.*}}: only on the nodes that store the index data.

h3. Changes

Documentation only, {{new-metrics.adoc}}:
* The {{\{opType\}}} template is replaced by the explicit list of 22 metrics. 
The note that the set of operations
  depends on the index implementation is kept.
* A "ZooKeeper Discovery" subsection is added to "Discovery IO" with the 
metrics of {{ZookeeperDiscoverySpi}}.
* Notes about server-only metrics and registers are added to "Cache Groups", 
"Sorted Indexes Operations",
  "Ignite REST Client Connector" and "Snapshot".

h3. How it was verified

A cluster of 2 server nodes and 1 client node was started from the current 
master with most optional features
enabled, so that conditional metrics are registered:
* persistence with CDC and an in-memory region;
* cache statistics, a near cache and an encrypted cache group with key rotation;
* SSL, a user executor, a service with statistics, H2 and Calcite;
* secondary indexes, a thin client and data structures;
* full and incremental snapshots with check and restore;
* a suppressed failure.

All metric registers of every node, including registers that exist only while 
an operation runs, were dumped and
compared with the tables of the page.

Results:
* JMX export ({{JmxMetricExporterSpi}}) matches the registers 1:1 on every node 
(srv: 2304/2306 metrics, client: 2177).
* Before the patch: 22 metrics are missing from the page, and 2 template rows 
don't exist at runtime.
* After the patch: no discrepancies.
* Not reproducible in this setup and checked against the code: 
{{ConflictResolver*}} (needs a conflict resolver; the
  page already notes the condition) and the ZooKeeper discovery metrics.
* The {{cdc}} register described in {{persistence/change-data-capture.adoc}} 
matches the code (13/13).


  was:
h3. Problem

The [System 
Views|https://ignite.apache.org/docs/ignite2/latest/monitoring-metrics/system-views]
 page
({{docs/_docs/monitoring-metrics/system-views.adoc}}) mostly matches the views 
published by a node. It has the
following gaps:

* The {{METRICS}} view ({{SYS.METRICS}}, created by the SQL view metric 
exporter, enabled by default) is published
  through SQL, JMX and {{control.sh --system-view}}, but the page doesn't 
describe it. It is mentioned only on the
  Metrics System page.
* {{METASTORAGE}} exists only on server nodes with persistence enabled, and 
{{SNAPSHOT}} exists only on server nodes.
  On other nodes a query fails with "table not found". The page doesn't mention 
this.
* Wrong column types:
** {{CACHES.REBALANCE_BATCHES_PREFETCH_COUNT}} is {{long}}, not {{int}}.
** 13 columns are documented as {{UUID}}, but they are {{IgniteUuid}}: their 
value isn't a UUID string, and
   {{SYS.VIEW_COLUMNS}} also reports {{IgniteUuid}}:
*** {{TASKS.ID}}, {{TASKS.SESSION_ID}}, {{TASKS.JOB_ID}};
*** {{JOBS.ID}}, {{JOBS.SESSION_ID}};
*** {{SERVICES.SERVICE_ID}};
*** {{TRANSACTIONS.XID}}, {{TRANSACTIONS.ORIGINATING_XID}};
*** {{CACHE_EXPLICIT_LOCKS.XID}};
*** {{CACHE_LOCKS.XID}}, {{CACHE_LOCKS.ORIGINATING_XID}};
*** {{DS_QUEUES.ID}}, {{DS_SETS.ID}}.
** {{SERVICES.TOPOLOGY_SNAPSHOT}} is {{Map<UUID, Integer>}}, not {{string}}.
* Empty descriptions: {{CACHES.IS_MANAGEMENT_ENABLED}}, 
{{CACHES.IS_STATISTICS_ENABLED}},
  {{SCAN_QUERIES.TASK_NAME}}.
* Javadoc markup in the text: {{CACHES.IS_STORE_KEEP_BINARY}} contains 
{{\{@link CacheStore\}}}.
* The {{CACHES}}, {{SERVICES}}, {{SQL_QUERIES_HISTORY}}, 
{{CACHE_GROUP_PAGE_LISTS}} and {{DATA_REGION_PAGE_LISTS}}
  sections have no introductory sentence.

h3. Changes

Documentation only, {{system-views.adoc}}:
* The {{METRICS}} section is added, with links to the SQL View and Histograms 
sections of the Metrics System page.
* Availability notes are added to {{METASTORAGE}} and {{SNAPSHOT}}.
* The column types listed above are fixed.
* The empty descriptions are filled in and the javadoc markup is removed.
* Introductory sentences are added to the 5 sections.
* A typo is fixed: "Ttransaction" in {{TRANSACTIONS.ORIGINATING_XID}}.

The column order and the mixed notation of types ({{string}}/{{long}} vs 
{{VARCHAR}}/{{BIGINT}}) are unchanged and can
be unified separately.

h3. How it was verified

A cluster of 2 server nodes and 1 client node was started from the current 
master with most optional features
enabled: persistence, encryption, SSL, services, H2 and Calcite, indexes, a 
thin client, data structures, continuous
and scan queries, transactions, locks and snapshots.

On every node the following were dumped and compared with the tables of the 
page:
* all system views, with the attributes of their walkers;
* {{SYS.VIEWS}} and {{SYS.VIEW_COLUMNS}} through both SQL engines;
* the JMX MBeans of the views.

Results:
* JMX export ({{JmxSystemViewExporterSpi}}) matches the registered views 1:1 
(server: 53, client: 51).
* H2 and Calcite expose the same views and columns.
* Before the patch: 1 view is missing from the page, plus 19 column-level 
discrepancies (types, empty descriptions,
  markup).
* After the patch: no discrepancies. All 53 views and their columns match the 
page.



> Docs: describe all index operation metrics, ZooKeeper discovery metrics and 
> server-only metric registers
> --------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-29236
>                 URL: https://issues.apache.org/jira/browse/IGNITE-29236
>             Project: Ignite
>          Issue Type: Task
>          Components: documentation
>            Reporter: Ilya Shishkov
>            Assignee: Ilya Shishkov
>            Priority: Minor
>
> h3. Problem
> The 
> [Metrics|https://ignite.apache.org/docs/ignite2/latest/monitoring-metrics/new-metrics]
>  page
> ({{docs/_docs/monitoring-metrics/new-metrics.adoc}}) mostly matches the 
> metrics published by a node. It doesn't match
> in the following places:
> * *Sorted Indexes Operations* 
> ({{index.\{schema_name\}.\{table_name\}.\{index_name\}}}): the table contains 
> only
>   the templates {{\{opType\}Count}} and {{\{opType\}Time}}, and the text 
> names 5 of the 11 operations. A node actually
>   publishes 22 metrics: {{AskNeighbor}}, {{Insert}}, 
> {{LockBackAndRmvFromLeaf}}, {{LockBackAndTail}}, {{LockTail}},
>   {{LockTailExact}}, {{LockTailForward}}, {{RemoveFromLeaf}}, 
> {{RemoveRangeFromLeaf}}, {{Replace}}, {{Search}}, each
>   with the {{Count}} and {{Time}} suffixes.
> * *Discovery IO* ({{io.discovery}}): only {{TcpDiscoverySpi}} metrics are 
> described. With {{ZookeeperDiscoverySpi}}
>   the register contains a different set: {{CommunicationErrors}}, 
> {{Coordinator}}, {{CurrentTopologyVersion}},
>   {{FailedNodes}}, {{JoinedNodes}}, {{LeftNodes}}. {{CommunicationErrors}} 
> isn't documented at all, and the counters
>   are {{long}}, not {{integer}} as for TCP discovery 
> ({{ZookeeperDiscoveryStatistics}}, 
> {{ZookeeperDiscoverySpi#onContextInitialized0}}).
> * The page doesn't say which metrics and registers exist on server nodes only:
> ** {{cacheGroups.\{group_name\}}}: {{InMemoryIndexPages}} and 
> {{TotalAllocatedPages}} are not registered on client
>    nodes (no data region, {{CacheGroupMetricsImpl}}).
> ** {{rest.client}}: on client nodes the register exists only with 
> {{IGNITE_REST_START_ON_CLIENT=true}}
>    ({{GridRestProcessor}}).
> ** {{snapshot}}, {{snapshot.incremental}}, {{snapshot-restore}}, 
> {{snapshot-check.\{snapshot_name\}}}: server nodes
>    only ({{IgniteSnapshotManager#start0}} exits on client nodes).
> ** {{index.*}}: only on the nodes that store the index data.
> h3. Changes
> Documentation only, {{new-metrics.adoc}}:
> * The {{\{opType\}}} template is replaced by the explicit list of 22 metrics. 
> The note that the set of operations
>   depends on the index implementation is kept.
> * A "ZooKeeper Discovery" subsection is added to "Discovery IO" with the 
> metrics of {{ZookeeperDiscoverySpi}}.
> * Notes about server-only metrics and registers are added to "Cache Groups", 
> "Sorted Indexes Operations",
>   "Ignite REST Client Connector" and "Snapshot".
> h3. How it was verified
> A cluster of 2 server nodes and 1 client node was started from the current 
> master with most optional features
> enabled, so that conditional metrics are registered:
> * persistence with CDC and an in-memory region;
> * cache statistics, a near cache and an encrypted cache group with key 
> rotation;
> * SSL, a user executor, a service with statistics, H2 and Calcite;
> * secondary indexes, a thin client and data structures;
> * full and incremental snapshots with check and restore;
> * a suppressed failure.
> All metric registers of every node, including registers that exist only while 
> an operation runs, were dumped and
> compared with the tables of the page.
> Results:
> * JMX export ({{JmxMetricExporterSpi}}) matches the registers 1:1 on every 
> node (srv: 2304/2306 metrics, client: 2177).
> * Before the patch: 22 metrics are missing from the page, and 2 template rows 
> don't exist at runtime.
> * After the patch: no discrepancies.
> * Not reproducible in this setup and checked against the code: 
> {{ConflictResolver*}} (needs a conflict resolver; the
>   page already notes the condition) and the ZooKeeper discovery metrics.
> * The {{cdc}} register described in {{persistence/change-data-capture.adoc}} 
> matches the code (13/13).



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to