[ https://issues.apache.org/jira/browse/IGNITE-24479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Efremov updated IGNITE-24479: ------------------------------------- Description: *Description* The main goal of the ticket is to make available for a user a new {{SystemView}} that shows an information about all leased cluster's primary replicas for all available replication groups. For such goal we may implement {{SystemViewProvider}} interface for a {{PlacementDriver}} instance from {{PlacementDriverManager#createPlacementDriver}}. We already have an access to {{Leases}} instance through public method {{LeaseTracker#leasesCurrent}}. {{Leases}} already has all desirable information with map from {{Leases#leaseByGroupId}} and it's values of {{Lease}}: * {{Lease#getLeaseholder}} for an Ignite node's consistent identifier. * {{Lease#getLeaseholderId}} for an Ignite node's UUID. * {{Lease#getStartTime}} for a lease start time. * {{Lease#isAccepted}} for only granted leases filtering. Inside of {{SystemViewProvider#systemViews}} we may create and use a {{LeasesViewProvider}} that returns the {{SystemViews}} that is built with {{SystemViews#clusterViewBuilder}}. For a reference we may look at {{TxManagerImpl#systemViews}} and {{LocksViewProvider#get}}. And last, but not least we should register the {{SystemViewProvider}} implementer in {{IgniteImpl#systemViewManager}} through {{SystemViewManager#register}}. *Motivation* {{PlacementDriver}} may unevenly distribute {{PrimaryReplicas}}. Generally both automatic and manual abilities to rebalance primaries is required. However in order to start the activity it's also needed to share the distribution with the user. *Definition of Done* * User should have an ability to check {{PrimaryReplica}}'s distribution via {{SystemView}}. * Fields are available in the new view: ** {{ReplicationGroupId}}; ** Ignite node's UUID; ** Ignite node's consistent Id; ** lease start time. * If a primary replica (its lease) isn't accepted then the record shouldn't be shown. * A corresponding test is implemented; scenario is 2 ignite nodes, 2 zones with separated node's profiles thus both leases are granted for different nodes separately, so in the test's cluster new view we should see 2 records with different nodes information. was: h3. Motivation PlacementDriver may unevenly distribute PrimaryReplicas. Generally both automatic and manual abilities to rebalance primaries is required. However in order to start the activty it's also needed to share the distribution with the user. h3. Definition of Done * User should have an ability to check PrimaryReplica's distribution via SystemView. > Share PrimaryReplicas distribution via SystemView > ------------------------------------------------- > > Key: IGNITE-24479 > URL: https://issues.apache.org/jira/browse/IGNITE-24479 > Project: Ignite > Issue Type: Improvement > Reporter: Alexander Lapin > Priority: Major > Labels: ignite-3 > > *Description* > The main goal of the ticket is to make available for a user a new > {{SystemView}} that shows an information about all leased cluster's primary > replicas for all available replication groups. For such goal we may implement > {{SystemViewProvider}} interface for a {{PlacementDriver}} instance from > {{PlacementDriverManager#createPlacementDriver}}. We already have an access > to {{Leases}} instance through public method {{LeaseTracker#leasesCurrent}}. > {{Leases}} already has all desirable information with map from > {{Leases#leaseByGroupId}} and it's values of {{Lease}}: > * {{Lease#getLeaseholder}} for an Ignite node's consistent identifier. > * {{Lease#getLeaseholderId}} for an Ignite node's UUID. > * {{Lease#getStartTime}} for a lease start time. > * {{Lease#isAccepted}} for only granted leases filtering. > Inside of {{SystemViewProvider#systemViews}} we may create and use a > {{LeasesViewProvider}} that returns the {{SystemViews}} that is built with > {{SystemViews#clusterViewBuilder}}. For a reference we may look at > {{TxManagerImpl#systemViews}} and {{LocksViewProvider#get}}. > And last, but not least we should register the {{SystemViewProvider}} > implementer in {{IgniteImpl#systemViewManager}} through > {{SystemViewManager#register}}. > *Motivation* > {{PlacementDriver}} may unevenly distribute {{PrimaryReplicas}}. Generally > both automatic and manual abilities to rebalance primaries is required. > However in order to start the activity it's also needed to share the > distribution with the user. > *Definition of Done* > * User should have an ability to check {{PrimaryReplica}}'s distribution via > {{SystemView}}. > * Fields are available in the new view: > ** {{ReplicationGroupId}}; > ** Ignite node's UUID; > ** Ignite node's consistent Id; > ** lease start time. > * If a primary replica (its lease) isn't accepted then the record shouldn't > be shown. > * A corresponding test is implemented; scenario is 2 ignite nodes, 2 zones > with separated node's profiles thus both leases are granted for different > nodes separately, so in the test's cluster new view we should see 2 records > with different nodes information. -- This message was sent by Atlassian Jira (v8.20.10#820010)