【发布时间】:2022-01-20 21:38:56
【问题描述】:
我用大约 90.000 个地址(ID 类似于“urn:ngsi-ld:address:Testtown:12345:Haus-Knipp-Str:15”)填充了一个 fiware orion-ld。
如果我通过 url 从 orion-ld 代理读取所有类型为“地址”的实体(使用偏移设置,逐步限制为 1000),例如“http://{{orion}}/ngsi-ld/v1/entities?type=Address&offset=0&limit=1000”,我随时都会收到来自 orion-ld 的预期答案,直到我尝试请求
“http://{{orion}}/ngsi-ld/v1/entities?type=Address&offset=25000&limit=1000”。
然后意外的答案是“[]”。它应该填充 1000 个实体。
如果我按 1000 个实体逐步删除类型为“地址”的所有实体(每次我请求前 1000 个实体并随后删除它们),我可以删除 >98000 个实体。所以所有 98000 个实体都在 orion-ld 中。但我无法从 orion-ld 读取所有实体。
我尝试找出最后一个可读实体,它是“http://{{orion}}/ngsi-ld/v1/entities?type=Address&offset=25248&limit=1”,下一个请求失败:“http://{{orion}}/ngsi-ld/v1/entities?type=Address&offset=25249&limit=1”如果我尝试获取高于 25248 的实体,它完全失败了。
如果我检查,如果“地址”类型的所有 98000 个 ID 都在 orion-ld 中,我会通过 url “http://{{orion}}/ngsi-ld/v1/entities/{{id}}”请求它们。我收到每个 ID 的预期答案。所以所有的 ID 都在 orion-ld 中。只有读请求失败,从offset>25248开始。
orion-ld 是否有错误,或者阈值未知,需要换一种方式处理?
今天我创建了 100,000 个“TestTestTest”类型的实体,例如:
{
"@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
"id": "TestTestTest:20000",
"type": "TestTestTest",
"name": {
"type": "Property",
"value": 20000
}
},
如果我再次尝试读取所有类型为“TestTestTest”的实体,我发现了另一个阈值:87637
read all entities for type TestTestTest with offset=86000 and limit=1000 --> successfull: read 1000 values
read all entities for type TestTestTest with offset=87000 and limit=1000 --> error: read 0 values
read all entities for type TestTestTest with offset=87000 and limit=500 --> successfull: read 500 values
read all entities for type TestTestTest with offset=87500 and limit=500 --> error: read 0 values
read all entities for type TestTestTest with offset=87500 and limit=250 --> error: read 0 values
read all entities for type TestTestTest with offset=87500 and limit=125 --> successfull: read 125 values
read all entities for type TestTestTest with offset=87625 and limit=125 --> error: read 0 values
read all entities for type TestTestTest with offset=87625 and limit=62 --> error: read 0 values
read all entities for type TestTestTest with offset=87625 and limit=31 --> error: read 0 values
read all entities for type TestTestTest with offset=87625 and limit=15 --> error: read 0 values
read all entities for type TestTestTest with offset=87625 and limit=7 --> successfull: read 7 values
read all entities for type TestTestTest with offset=87632 and limit=7 --> error: read 0 values
read all entities for type TestTestTest with offset=87632 and limit=3 --> successfull: read 3 values
read all entities for type TestTestTest with offset=87635 and limit=3 --> successfull: read 3 values
read all entities for type TestTestTest with offset=87638 and limit=3 --> error: read 0 values
read all entities for type TestTestTest with offset=87638 and limit=1 --> error: read 0 values
try to read the last readable entity with type TestTestTest with offset=87637 and limit=1 --> id=TestTestTest:87637
try to read an entity after the last readable entity with type TestTestTest with offset=87638 and limit=1 --> []
ERROR, the requested amount of entities (iOffset=87637) seems not the expected count.
我在 docker 环境中使用以下版本的 orion-ld:
{
"orionld version": "post-v0.8.1",
"orion version": "1.15.0-next",
"uptime": "7 d, 12 h, 2 m, 55 s",
"git_hash": "nogitversion",
"compile_time": "Wed Dec 15 15:12:50 UTC 2021",
"compiled_by": "root",
"compiled_in": "",
"release_date": "Wed Dec 15 15:12:50 UTC 2021",
"doc": "https://fiware-orion.readthedocs.org/en/master/"
}
如果您能在这种情况下提供帮助,那就太好了。 谢谢,克尼格
【问题讨论】: