Comments (1)
你好,@fantengfeiNana!很高兴再次看到你的问题,希望这次我们也能一起找到解决方案。
根据您的描述,我发现了一个类似的问题:[Bug] Incorrect return value of the same query。这个问题描述了在并发查询时,返回的结果与预期不符,与您的问题有一定的相似性。
关于您提到的/gremlin
接口的行为,根据我在GremlinAPI.java
中的代码分析,这个接口处理请求的方式(同步或异步)主要取决于底层的服务器框架(如Servlet,Netty)和HugeGraph服务器的配置,而不是在提供的代码片段中明确定义。然而,post
和get
方法并未使用JAX-RS的异步特性如AsyncResponse
,因此基于这段代码,看起来请求是同步处理的。但是,如果没有关于服务器设置的额外上下文,或者在应用程序的其他地方存在任何异步配置或实现,我们无法确定并发处理的具体行为。
关于HugeGraph的并发操作返回不一致数据的问题,可能与以下几个因素有关:
-
事务隔离和一致性:当并发操作(特别是读写操作)被执行时,事务的隔离级别可能会影响读取数据的一致性。如果一个线程正在更新图形,而另一个线程正在读取,根据隔离级别,读操作可能会看到图形的部分状态。
-
速率限制:如果并发操作超过这些限制,可能会导致限流,这可能会影响操作的执行和完成,可能导致不一致或意外的结果。
-
缓存一致性:在并发场景下,可能会出现缓存一致性问题,其中一个线程更新了图形,但另一个线程看到的缓存没有及时更新,导致读取不一致。
-
后端存储一致性:后端存储的一致性模型也可能影响并发操作的结果。根据后端存储如何处理并发操作,可能会在反映一个操作所做的更新到另一个操作所看到的视图中有延迟。
解决这个问题可能需要结合这些策略,根据您的部署和使用情况的具体细节进行定制。
关于HugeGraph的速率限制功能,它通过控制操作可以执行的速率来工作。当并发操作超过指定的速率限制时,超出的操作将无法立即获取许可。这意味着这些操作将不得不等待许可变得可用(这发生在ratePerSecond
指定的速率下),或者如果它们不能等待,它们将被拒绝执行。这种机制确保系统不会被过多的操作一次性压垮,这对于维持性能和避免资源耗尽至关重要。
希望这些信息能对您有所帮助。如果您有任何其他问题或需要进一步的澄清,请随时告诉我。
Sources
- [Bug] Incorrect return value of the same query
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
- hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/RateLimiter.java
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
PS: 有重复的 issue, 所以先关闭当前的, 汇聚到一个
from incubator-hugegraph.
Related Issues (20)
- [Question] call rest-api in multi-users env (concurrency) HOT 6
- Optimizing Shortest Path Calculation HOT 6
- [Bug] migrating from version 0.11 to apache release 1.2.0, but start failed HOT 3
- [Summary] Dropping Support for Java 8: Compatibility Breaks Ahead
- [Question] 1.2.0 create graph in rest-api throws auth related permission HOT 7
- 创建属性的时候报错 HOT 2
- hugegraph集群应该怎么配置? HOT 2
- 集群部署hugegraph1.2.0 ,但是在主节点创建图同步失败,是因为什么原因造成的? HOT 5
- [Summary] Feedback on the trial of HugeGraph Distributed (pd-store) Version (BETA)
- [Bug] g.E().count() the result is not as expectedThe result is not as expected HOT 8
- 如何对Hugegraph-server中的Kneighbor算法的执行过程作profiling。分析算法执行过程中的各个阶段的内存和CPU占用。 HOT 7
- [Question] i have deploy hugegraph server( singel node), write occur error: org.apache.hugegraph.exception.ServerException: The rest server is too busy to write HOT 3
- [Bug] gremlin example script execution error with RocksDB backend
- [Question] understanding Single Source Shortest Path and Traversal API within HugeGraph HOT 2
- [Question] Why we use relational/SQL based backend storage in GraphDB? HOT 5
- [Question] Error during serialization, serializer org.apache.hugegraph.backend.id.IdGenerator$StringId not found HOT 4
- [Question] There is no demo of how creating a graph through GraphAPI in test module and I had try client.post() failed. HOT 13
- [Question] How to check hugegraph node(role) status like master-worker? HOT 3
- [Question] When vertex strategy is CUSTOMIZE_UUID, is there need to pass the id value in json? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from incubator-hugegraph.