dosubot[bot] commented on issue #3009: URL: https://github.com/apache/hugegraph/issues/3009#issuecomment-4496051325
<!-- Answer --> I agree with the phased approach — **Option A first, Option B later if needed** — and here's my reasoning: **Option A is the right short-term fix** because: 1. **`commitAsync()` has zero callers** in the codebase [[1]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSessionPool.java#L170-L192), so there's no existing workload that depends on its async throughput characteristics. You won't regress anything. 2. **It already blocks** via `getUninterruptibly()` every 1023 statements — the "async" is really just bounded parallelism, not a truly non-blocking API. The throughput delta from switching to per-statement `executeWithRetry()` is likely small. 3. **`executeWithRetry()` is already merged** (PR #2997, April 2026) [[2]](https://github.com/apache/hugegraph/pull/2997) and provides exponential backoff, session reset, and idempotency checks. Reusing it means no new infrastructure and consistent semantics with `commit()`. 4. **No precedent for `Futures.catching()`** — the codebase uses synchronous retry loops everywhere else. Option B would introduce a pattern the team hasn't used before, increasing maintenance cost for an unused method. **One suggestion**: since `commitAsync()` is currently dead code with misleading naming, consider either: - Renaming it (e.g., `commitBatch()` or `commitParallel()`) if you plan to keep the bounded-parallelism behavior in the future, or - Documenting a concrete future call site that would justify investing in Option B later. Without a real caller that benefits from async pipelining, Option B's complexity is hard to justify. If a use case does emerge (e.g., high-throughput bulk loading), that would be the right time to revisit with proper benchmarks. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fhugegraph).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fhugegraph). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fhugegraph&message_id=4444c6d4-f5b4-4793-a82e-22f9c24047e6) [](https://github.dosu.com/apache/hugegraph?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fhugegraph) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fhugegraph) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
