我正在尝试使用Admin API更新“JSON”类型的 Pulsar 模式。
我有一个具有单个模式版本的 pulsar 命名空间“lol”和主题“sdf” 主题模式版本列表
我尝试通过发布另一个 JSON 架构来更新此架构,但收到 500 错误。 发布请求和响应
Pulsar 日志文件为空。Pulsar 堆栈跟踪没有任何信息。
09:41:36.930 [BookKeeperClientWorker-OrderedExecutor-0-0] INFO org.eclipse.jetty.server.RequestLog - 127.0.0.1 - - [20/Jul/2021:09:41:36 +0300] "POST /admin/v2/schemas/public/lol/sdf/schema HTTP/1.1" 500 565 "-" "PostmanRuntime/7.26.8" 159
当我尝试以相同的方式更新“AVRO”类型的架构时,一切正常,架构版本上升。
任何人都可以帮助找到这种奇怪行为的原因吗?
这是请求正文
{"type": "JSON", "schema": "{ \"$id\": \"https://example.com/person.schema.json\", \"$schema\": \"https://json-schema.org/draft/2020-12/schema\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"firstName\": { \"type\": \"string\", \"description\": \"The person's first name.\" }, \"lastName\": { \"type\": \"string\", \"description\": \"The person's last name.\" }, \"age\": { \"description\": \"Age in years which must be equal to or greater than zero.\", \"type\": \"integer\", \"minimum\": 0 } }}", "properties": {} }
这是当前架构定义“GET /admin/v2/schemas/public/lol/sdf/schema”
{
"version": 0,
"type": "JSON",
"timestamp": 0,
"data": "{ \"$id\": \"https://example.com/person.schema.json\", \"$schema\": \"https://json-schema.org/draft/2020-12/schema\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"firstName\": { \"type\": \"string\", \"description\": \"The person's first name.\" }, \"surname\": { \"type\": \"string\", \"description\": \"The person's last name.\" }, \"age\": { \"description\": \"Age in years which must be equal to or greater than zero.\", \"type\": \"integer\", \"minimum\": 0 } }}",
"properties": {}