Skip to content

HugeGraphSparkLoader中LoadContext的schemaCache一直没有数据,后续查询元数据后也未放入schemaCache中 #333

Closed

Description

@haohao0103

Bug Type (问题类型)

others (please comment below)

Before submit

  • I had searched in the issues and found no similar issues.

Environment (环境信息)

  • Server Version: v0.12.x
  • Loader Version: master
  • Data Size: 20000w vertices, 300000w edges

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

  1. imbajin commented on Sep 16, 2022

    @imbajin
    Member

    How to reproduce it?

    另外 loader 默认获取元信息是通过 client 的 rest-api 查询的, 你是否可以直接通过 rest-api 的元数据接口查到数据呢?

    还是这个问题只有在 spark-loader 的情况下出现, 直接本地 load 会有么. 缺乏了比较多的上下文需要补充一下

  2. haohao0103 commented on Sep 16, 2022

    @haohao0103
    CollaboratorAuthor

    你好;这个只会在spark-loader情况下出现,本地load代码中loadcontext创建后执行了createSchema()获取了最新的元数据;我们是运行spark-loader发现性能比较差,排查了代码发现每次buildVertex和builEdge时都要通过client去后端查询,而且查询后并没有放入schemaCache中;我现在是在代码中增加了client查询元数据后更新下缓存解决的

  3. imbajin commented on Sep 16, 2022

    @imbajin
    Member

    你好;这个只会在spark-loader情况下出现,本地load代码中loadcontext创建后执行了createSchema()获取了最新的元数据;我们是运行spark-loader发现性能比较差,排查了代码发现每次buildVertex和builEdge时都要通过client去后端查询,而且查询后并没有放入schemaCache中;我现在是在代码中增加了client查询元数据后更新下缓存解决的

    @simon824 这里是忘复用 schema-cache 了么 (也可看看 flink-loader 是否也有类似的问题)

  4. haohao0103 commented on Sep 16, 2022

    @haohao0103
    CollaboratorAuthor

    是的,忘记复用schema-cache 了,flink-loader还没用过,需要去确认下

  5. imbajin commented on Sep 16, 2022

    @imbajin
    Member

    是的,忘记复用schema-cache 了,flink-loader还没用过,需要去确认下

    你也可以修复一下这个问题(顺便检查下 flink-loader 是否也遗漏了), 提个 PR , 欢迎 😄

  6. haohao0103 commented on Sep 16, 2022

    @haohao0103
    CollaboratorAuthor

    好的

  7. added 3 commits that reference this issue on Sep 16, 2022
    22a8c88
    d75f263
    d09a1f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions