Skip to content

Commit

Permalink
using common structures in replication schemes
Browse files Browse the repository at this point in the history
Signed-off-by: Tokesh <[email protected]>
  • Loading branch information
Tokesh committed Nov 17, 2024
1 parent 9e1e502 commit 0ab0105
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 48 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ jobs:
tests: routing
- version: 2.18.0
tests: snapshot
- version: 2.16.0
- version: 2.18.0
tests: plugins/replication
url: http://localhost:9200
- version: 2.17.0
- version: 2.18.0
tests: plugins/streaming
- version: 2.18.0
Expand Down
35 changes: 7 additions & 28 deletions spec/namespaces/replication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,34 +248,22 @@ components:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
$ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase'
replication.stop@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
$ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase'
replication.pause@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
$ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase'
replication.resume@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
$ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase'
replication.status@200:
content:
application/json:
Expand All @@ -300,23 +288,14 @@ components:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
$ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase'
replication.create_replication_rule@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
$ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase'
replication.delete_replication_rule@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
$ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase'
41 changes: 23 additions & 18 deletions spec/schemas/replication._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ components:
type: object
properties:
leader_alias:
type: string
$ref: '_common.yaml#/components/schemas/IndexAlias'
leader_index:
type: string
$ref: '_common.yaml#/components/schemas/IndexName'
use_roles:
$ref: '#/components/schemas/UseRoles'
UseRoles:
Expand All @@ -27,14 +27,19 @@ components:
properties:
status:
type: string
enum:
- BOOTSTRAPPING
- PAUSED
- REPLICATION NOT IN PROGRESS
- SYNCING
reason:
type: string
leader_alias:
type: string
$ref: '_common.yaml#/components/schemas/IndexAlias'
leader_index:
type: string
$ref: '_common.yaml#/components/schemas/IndexName'
follower_index:
type: string
$ref: '_common.yaml#/components/schemas/IndexName'
syncing_details:
$ref: '#/components/schemas/SyncingDetails'
SyncingDetails:
Expand All @@ -45,7 +50,7 @@ components:
follower_checkpoint:
type: integer
seq_no:
type: integer
$ref: '_common.yaml#/components/schemas/SequenceNumber'
LeaderStatus:
type: object
properties:
Expand All @@ -54,17 +59,17 @@ components:
operations_read:
type: number
translog_size_bytes:
type: number
$ref: '_common.yaml#/components/schemas/ByteCount'
operations_read_lucene:
type: number
operations_read_translog:
type: number
total_read_time_lucene_millis:
type: number
$ref: '_common.yaml#/components/schemas/StringifiedEpochTimeUnitMillis'
total_read_time_translog_millis:
type: number
$ref: '_common.yaml#/components/schemas/StringifiedEpochTimeUnitMillis'
bytes_read:
type: number
$ref: '_common.yaml#/components/schemas/ByteCount'
index_stats:
type: object
additionalProperties:
Expand All @@ -75,17 +80,17 @@ components:
operations_read:
type: number
translog_size_bytes:
type: number
$ref: '_common.yaml#/components/schemas/ByteCount'
operations_read_lucene:
type: number
operations_read_translog:
type: number
total_read_time_lucene_millis:
type: number
$ref: '_common.yaml#/components/schemas/StringifiedEpochTimeUnitMillis'
total_read_time_translog_millis:
type: number
$ref: '_common.yaml#/components/schemas/StringifiedEpochTimeUnitMillis'
bytes_read:
type: number
$ref: '_common.yaml#/components/schemas/ByteCount'
FollowerStatus:
type: object
properties:
Expand Down Expand Up @@ -118,7 +123,7 @@ components:
leader_checkpoint:
type: number
total_write_time_millis:
type: number
$ref: '_common.yaml#/components/schemas/StringifiedEpochTimeUnitMillis'
index_stats:
type: object
additionalProperties:
Expand All @@ -143,7 +148,7 @@ components:
leader_checkpoint:
type: number
total_write_time_millis:
type: number
$ref: '_common.yaml#/components/schemas/StringifiedEpochTimeUnitMillis'
AutoFollowStatus:
type: object
properties:
Expand Down Expand Up @@ -208,7 +213,7 @@ components:
type: object
properties:
leader_alias:
type: string
$ref: '_common.yaml#/components/schemas/IndexAlias'
name:
type: string
pattern:
Expand All @@ -219,6 +224,6 @@ components:
type: object
properties:
leader_alias:
type: string
$ref: '_common.yaml#/components/schemas/IndexAlias'
name:
type: string

0 comments on commit 0ab0105

Please sign in to comment.