-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If a new record is automatically created after Tag/Edge/Index is automatically created, the system occasionally displays "No valid tag/edge/index found" #5749
Comments
Yes, your understanding is correct. The query statement utilizes the graph service, which requires communication with the meta service to obtain metadata. The newly added schema information will take effect and be queryable after 2 heartbeats (by default, one heartbeat is 10 seconds) following the creation of the tag/edgetype. |
邮件已收到。
|
😂 好的,我已经收到了你的邮件回执了(虽然它是一个 GitHub 的邮件通知 |
十分感谢您的回复,设置为 2 个心跳后,几乎不会出现类似的问题了,但会影响一个新建的 Space 对于历史版本升级的速度,目前还可接受。还想请教一下 graph service 与 query statement所运行的服务之间数据选择最终一致性策略的原因,以及请问后续是否有数据同步策略从最终一致性修改为强一致性的计划。 |
For both data(raft on storaged) and metadata(schema, raft on metad), they are both strong consistency instead of eventual consistency. The 2 heart beats we need to wait is actually for the consumers of those schema(rather than the replicas) to be synced(storaged to update meta cache). |
Hi, I have noticed that the issue you created hasn’t been updated for nearly a month, so I have to close it for now. If you have any new updates, you are welcome to reopen this issue anytime. Thanks a lot for your contribution anyway 😊 |
邮件已收到。
|
Hello open source worker,
My project is a Java project and references com.vesoft.client version 3.5.0.
Based on the version control capability of Liquibase, I developed a version control tool for meta service for Space, which enables the project to complete the construction of Space according to the depth of nGQL tree. However, in the process of testing, I found that once my nGQL belongs to a schema change statement, for example, after creating a Tag, quickly adding a record for this Tag will indicate that the Tag does not exist.
2023-11-01 13:52:39.939 DEBUG 22355 --- [ main] c.d.c.c.nebula.NebulaSessionServiceImpl : NebulaSessionService is executing [describe tag version_control]
2023-11-01 13:52:44.152 DEBUG 26568 --- [ main] c.d.c.c.nebula.NebulaSessionServiceImpl : NebulaSessionService result isSuccess:[false], errorMsg:[TagNotFound: Tag not existed!]
2023-11-01 13:52:44.153 DEBUG 26569 --- [ main] c.d.c.c.nebula.NebulaSessionServiceImpl : NebulaSessionService is executing [create tag if not exists version_control(id string,author string,file_name string,date_executed datetime,md5 string,ngql string)]
2023-11-01 13:52:44.222 DEBUG 26638 --- [ main] c.d.c.c.nebula.NebulaSessionServiceImpl : NebulaSessionService result isSuccess:[true], errorMsg:[]
2023-11-01 13:52:49.229 DEBUG 31645 --- [ main] c.d.c.c.nebula.NebulaSessionServiceImpl : NebulaSessionService is executing [create tag index if not exists version_control_id_md5_index on version_control(id(20),md5(32))]
2023-11-01 13:52:49.254 DEBUG 31670 --- [ main] c.d.c.c.nebula.NebulaSessionServiceImpl : NebulaSessionService result isSuccess:[true], errorMsg:[]
2023-11-01 13:52:54.411 DEBUG 36827 --- [ main] c.d.c.c.nebula.NebulaSessionServiceImpl : NebulaSessionService is executing [MATCH (r:version_control) where r.version_control.id == "initialization#20231009#01" RETURN count(*) as count]
2023-11-01 13:52:58.538 DEBUG 40954 --- [ main] c.d.c.c.nebula.NebulaSessionServiceImpl : NebulaSessionService result isSuccess:[false], errorMsg:[Error found in optimization stage: IndexNotFound: No valid index found]
java.lang.RuntimeException: existed validation is error ,msg : Error found in optimization stage: IndexNotFound: No valid index found
I guess MetaService and GraphService directly have a data synchronization mechanism, so after identifying the schema change statement, the executor sleeps several beats, which effectively reduces the probability of exceptions.
But I still have one question:
If it is a schema change statements, for the com. Vesoft. Nebula. Client. Graph. SessionPool. Execute (String STMT) after completion of the synchronization mechanism should return a ResultSet, Otherwise, it is impossible to completely avoid consistency problems resulting in abnormal execution of new record statements.
Hope the developers can solve my doubts.
The text was updated successfully, but these errors were encountered: