Bug Type (问题类型)
logic (逻辑设计问题)
Before submit
Environment (环境信息)
- Server Version: 1.0.0 (Apache Release Version)
- Backend: RocksDB x nodes, HDD or SSD
- OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x
- Data Size: xx vertices, xx edges
Expected & Actual behavior (期望与实际表现)
Follow-up from #2997 / #2740.
Code pointer:
|
// TODO: track async retry support in a follow-up issue. |
|
// commitAsync() bypasses executeWithRetry(). |
|
// During a Cassandra restart, async writes may fail with |
|
// NoHostAvailableException even when maxRetries > 0. Callers |
|
// must handle ResultSetFuture failures surfaced by |
|
// getUninterruptibly(). A follow-up issue should wrap each |
|
// future with retry semantics. |
Expected behavior
When Cassandra is temporarily unavailable or restarted, the Cassandra backend should handle transient connectivity failures consistently between synchronous and asynchronous write paths.
CassandraSessionPool.Session.commit() now uses executeWithRetry() and can retry transient failures such as NoHostAvailableException.
commitAsync() should either provide equivalent retry support for async writes, or explicitly define and document different reliability semantics.
Actual behavior
CassandraSessionPool.Session.commitAsync() bypasses executeWithRetry() and calls Datastax Session.executeAsync(...) directly.
During a Cassandra restart, async writes issued through commitAsync() can fail with transient driver errors such as NoHostAvailableException.
The failure is only surfaced through the Datastax ResultSetFuture / getUninterruptibly() flow. Callers that do not inspect these futures carefully may miss failed async writes.
This creates inconsistent behavior:
commit() -> executeWithRetry() -> transient retry support
commitAsync() -> executeAsync() -> no async retry support
Vertex/Edge example (问题点 / 边数据举例)
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
Bug Type (问题类型)
logic (逻辑设计问题)
Before submit
Environment (环境信息)
Expected & Actual behavior (期望与实际表现)
Follow-up from #2997 / #2740.
Code pointer:
hugegraph/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSessionPool.java
Lines 237 to 243 in 836b348
Expected behavior
When Cassandra is temporarily unavailable or restarted, the Cassandra backend should handle transient connectivity failures consistently between synchronous and asynchronous write paths.
CassandraSessionPool.Session.commit()now usesexecuteWithRetry()and can retry transient failures such asNoHostAvailableException.commitAsync()should either provide equivalent retry support for async writes, or explicitly define and document different reliability semantics.Actual behavior
CassandraSessionPool.Session.commitAsync()bypassesexecuteWithRetry()and calls DatastaxSession.executeAsync(...)directly.During a Cassandra restart, async writes issued through
commitAsync()can fail with transient driver errors such asNoHostAvailableException.The failure is only surfaced through the Datastax
ResultSetFuture/getUninterruptibly()flow. Callers that do not inspect these futures carefully may miss failed async writes.This creates inconsistent behavior:
Vertex/Edge example (问题点 / 边数据举例)
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)