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

Open
#2,745 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
databases

Research direction

Start with org.apache.hugegraph.backend.query.Query and trace how server properties are defined and loaded. Identify the existing tests for query limits or server configuration, then verify that the capacity can be set through a server property and that the configured value is reflected in limit handling. Document the property and its default if documentation files are identified.

Written by the indexing model from the issue text.

Description

feature
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:

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`
  1. This fixed limit doesn't account for varying server capabilities - servers with substantial memory and processing power are still constrained by this arbitrary limit.
  2. It forces users to implement complex client-side pagination logic for legitimate use cases that need to process more records.
  3. The limit isn't documented prominently in user documentation, leading to confusion when users encounter this error.
Dominant language
Java
Stars
3.2k
Forks
637
Avg merge
3d 18h
Merged PRs (30d)
23

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/hugegraph

All issues in apache/hugegraph

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.