From 3dcd2cdcb44c98500adeb57d9ed549161781e24b Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Fri, 14 Jul 2017 16:42:04 -0700 Subject: [PATCH] doc: update rpc swagger for HashKV rpc and its req/resp --- .../apispec/swagger/rpc.swagger.json | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/Documentation/dev-guide/apispec/swagger/rpc.swagger.json b/Documentation/dev-guide/apispec/swagger/rpc.swagger.json index 28e20e0dd..0b571d869 100644 --- a/Documentation/dev-guide/apispec/swagger/rpc.swagger.json +++ b/Documentation/dev-guide/apispec/swagger/rpc.swagger.json @@ -858,15 +858,15 @@ "tags": [ "Maintenance" ], - "summary": "Hash returns the hash of the local KV state for consistency checking purpose.\nThis is designed for testing; do not use this in production when there\nare ongoing transactions.", - "operationId": "Hash", + "summary": "HashKV computes the hash of all MVCC keys up to a given revision.", + "operationId": "HashKV", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/etcdserverpbHashRequest" + "$ref": "#/definitions/etcdserverpbHashKVRequest" } } ], @@ -874,7 +874,7 @@ "200": { "description": "(empty)", "schema": { - "$ref": "#/definitions/etcdserverpbHashResponse" + "$ref": "#/definitions/etcdserverpbHashKVResponse" } } } @@ -1552,6 +1552,34 @@ } } }, + "etcdserverpbHashKVRequest": { + "type": "object", + "properties": { + "revision": { + "description": "revision is the key-value store revision for the hash operation.", + "type": "string", + "format": "int64" + } + } + }, + "etcdserverpbHashKVResponse": { + "type": "object", + "properties": { + "compact_revision": { + "description": "compact_revision is the compacted revision of key-value store when hash begins.", + "type": "string", + "format": "int64" + }, + "hash": { + "description": "hash is the hash value computed from the responding member's MVCC keys up to a given revision.", + "type": "integer", + "format": "int64" + }, + "header": { + "$ref": "#/definitions/etcdserverpbResponseHeader" + } + } + }, "etcdserverpbHashRequest": { "type": "object" }, @@ -1559,7 +1587,7 @@ "type": "object", "properties": { "hash": { - "description": "hash is the hash value computed from the responding member's key-value store.", + "description": "hash is the hash value computed from the responding member's KV's backend.", "type": "integer", "format": "int64" },