### Bug Type (问题类型) others (please comment below) ### Before submit - [X] I had searched in the [issues](https://github.com/hugegraph/hugegraph-loader/issues) and found no similar issues. ### Environment (环境信息) - Server Version: v0.12.x - Loader Version: master - Data Size: 20000w vertices, 300000w edges <!-- (like 1000W 点, 9000W 边) --> ### Expected & Actual behavior (期望与实际表现) ``` public PropertyKey getPropertyKey(String name) { PropertyKey propertyKey = this.propertyKeys.get(name); if (propertyKey == null) { try { propertyKey = this.client.schema().getPropertyKey(name); // 后端查询后未更新schemacache } catch (ServerException e) { throw new LoadException("The property key '%s' doesn't exist", name); } } return propertyKey; } ``` ### Vertex/Edge example (问题点 / 边数据举例) _No response_ ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构) _No response_
Activity
imbajin commentedon Sep 16, 2022
How to reproduce it?
另外 loader 默认获取元信息是通过 client 的 rest-api 查询的, 你是否可以直接通过 rest-api 的元数据接口查到数据呢?
还是这个问题只有在 spark-loader 的情况下出现, 直接本地 load 会有么. 缺乏了比较多的上下文需要补充一下
haohao0103 commentedon Sep 16, 2022
你好;这个只会在spark-loader情况下出现,本地load代码中loadcontext创建后执行了createSchema()获取了最新的元数据;我们是运行spark-loader发现性能比较差,排查了代码发现每次buildVertex和builEdge时都要通过client去后端查询,而且查询后并没有放入schemaCache中;我现在是在代码中增加了client查询元数据后更新下缓存解决的
imbajin commentedon Sep 16, 2022
@simon824 这里是忘复用 schema-cache 了么 (也可看看 flink-loader 是否也有类似的问题)
haohao0103 commentedon Sep 16, 2022
是的,忘记复用schema-cache 了,flink-loader还没用过,需要去确认下
imbajin commentedon Sep 16, 2022
你也可以修复一下这个问题(顺便检查下 flink-loader 是否也遗漏了), 提个 PR , 欢迎 😄
haohao0103 commentedon Sep 16, 2022
好的
Fix bug: SchemaCache init and after query schema then put the latest …
Fix bug: SchemaCache init and after query schema then put the latest …
Fix bug: flink-loader SchemaCache init