apache / apache/hugegraph

[Feature] Enhancement request: Make Query.DEFAULT_CAPACITY configurable via server properties

Open
#2,745 0 comments 4 reactions 0 assignees View on GitHub
feature
Dominant language
Java
Stars
3.2k
Forks
636
Avg merge
3d 11h
Merged PRs (30d)
14

Description

### Feature Description (功能描述)

**Problem Statement**
The current implementation in `org.apache.hugegraph.backend.query.Query` class uses a hard-coded `DEFAULT_CAPACITY` value of 800,000 records:
```java
public static final long DEFAULT_CAPACITY = 800000L; // HugeGraph-777
```

This limitation creates the following problems:

1. When executing large graph queries that exceed this limit, users encounter the following error:
```
org.apache.hugegraph.exception.LimitExceedException: Too many records(must <= 800000) for the query: `Query * from EDGE_LABEL_INDEX where id prefix with 0x45493a2d323a4e00`
```
2. This fixed limit doesn't account for varying server capabilities - servers with substantial memory and processing power are still constrained by this arbitrary limit.
3. It forces users to implement complex client-side pagination logic for legitimate use cases that need to process more records.
4. The limit isn't documented prominently in user documentation, leading to confusion when users encounter this error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.