Skip to content

Commit e12fb6f

Browse files
cosziotimvisee
andauthored
[cluster telemetry] Aggregate telemetries from peers (#7696)
* aggregate telemetries * upd openapi * expect dead code * Pick just the highest telemetry * Tweak transfer selection --------- Co-authored-by: timvisee <[email protected]>
1 parent 8ab86b6 commit e12fb6f

4 files changed

Lines changed: 489 additions & 0 deletions

File tree

docs/redoc/master/openapi.json

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16339,6 +16339,147 @@
1633916339
}
1634016340
}
1634116341
}
16342+
},
16343+
"DistributedTelemetryData": {
16344+
"type": "object",
16345+
"required": [
16346+
"collections"
16347+
],
16348+
"properties": {
16349+
"collections": {
16350+
"type": "object",
16351+
"additionalProperties": {
16352+
"$ref": "#/components/schemas/DistributedCollectionTelemetry"
16353+
}
16354+
},
16355+
"cluster": {
16356+
"anyOf": [
16357+
{
16358+
"$ref": "#/components/schemas/DistributedClusterTelemetry"
16359+
},
16360+
{
16361+
"nullable": true
16362+
}
16363+
]
16364+
}
16365+
}
16366+
},
16367+
"DistributedCollectionTelemetry": {
16368+
"type": "object",
16369+
"required": [
16370+
"id"
16371+
],
16372+
"properties": {
16373+
"id": {
16374+
"description": "Collection name",
16375+
"type": "string"
16376+
},
16377+
"reshardings": {
16378+
"description": "Ongoing resharding operations",
16379+
"type": "array",
16380+
"items": {
16381+
"$ref": "#/components/schemas/ReshardingInfo"
16382+
},
16383+
"nullable": true
16384+
},
16385+
"shard_transfers": {
16386+
"description": "Ongoing shard transfers",
16387+
"type": "array",
16388+
"items": {
16389+
"$ref": "#/components/schemas/ShardTransferInfo"
16390+
},
16391+
"nullable": true
16392+
}
16393+
}
16394+
},
16395+
"DistributedClusterTelemetry": {
16396+
"type": "object",
16397+
"required": [
16398+
"enabled",
16399+
"peers"
16400+
],
16401+
"properties": {
16402+
"enabled": {
16403+
"type": "boolean"
16404+
},
16405+
"number_of_peers": {
16406+
"type": "integer",
16407+
"format": "uint64",
16408+
"minimum": 0,
16409+
"nullable": true
16410+
},
16411+
"peers": {
16412+
"type": "object",
16413+
"additionalProperties": {
16414+
"$ref": "#/components/schemas/DistributedPeerInfo"
16415+
}
16416+
}
16417+
}
16418+
},
16419+
"DistributedPeerInfo": {
16420+
"type": "object",
16421+
"required": [
16422+
"responsive",
16423+
"uri"
16424+
],
16425+
"properties": {
16426+
"uri": {
16427+
"description": "URI of the peer",
16428+
"type": "string"
16429+
},
16430+
"responsive": {
16431+
"description": "Whether this peer responded for this request",
16432+
"type": "boolean"
16433+
},
16434+
"role": {
16435+
"description": "Consensus role for the peer",
16436+
"anyOf": [
16437+
{
16438+
"$ref": "#/components/schemas/StateRole"
16439+
},
16440+
{
16441+
"nullable": true
16442+
}
16443+
]
16444+
},
16445+
"is_voter": {
16446+
"description": "Whether it can participate in leader elections",
16447+
"type": "boolean",
16448+
"nullable": true
16449+
},
16450+
"term": {
16451+
"description": "Election term",
16452+
"type": "integer",
16453+
"format": "uint64",
16454+
"minimum": 0,
16455+
"nullable": true
16456+
},
16457+
"commit": {
16458+
"description": "Latest accepted commit",
16459+
"type": "integer",
16460+
"format": "uint64",
16461+
"minimum": 0,
16462+
"nullable": true
16463+
},
16464+
"num_pending_operations": {
16465+
"description": "Number of operations pending for being applied",
16466+
"type": "integer",
16467+
"format": "uint64",
16468+
"minimum": 0,
16469+
"nullable": true
16470+
},
16471+
"consensus_thread_status": {
16472+
"description": "Status of consensus thread",
16473+
"anyOf": [
16474+
{
16475+
"$ref": "#/components/schemas/ConsensusThreadStatus"
16476+
},
16477+
{
16478+
"nullable": true
16479+
}
16480+
]
16481+
}
16482+
}
1634216483
}
1634316484
}
1634416485
}

0 commit comments

Comments
 (0)