contrueCT opened a new pull request, #3144:
URL: https://github.com/apache/hugegraph/pull/3144

   ## Purpose of the PR
   
   - Implements Phase 1 task-result retrieval for large task outputs. `GET 
/tasks/{id}/result` now streams the persisted LZ4 result instead of 
materializing the entire JSON payload in memory, and adds resumable pagination 
for top-level arrays and objects.
   
   ## Main Changes
   
   ```mermaid
   flowchart LR
       Client[REST client] --> API[TaskAPI result endpoint]
       API --> Snapshot[Task-result snapshot]
       Snapshot --> Streamer[TaskResultStreamer]
       Streamer --> Decode[LZ4 streaming decode]
       Decode --> Result[Full JSON stream or page response]
       Result --> Client
   ```
   
   - Add stable task-result snapshots for standard and distributed schedulers.
   - Stream decompression with request timeouts, bounded concurrent readers, 
transport-aware error handling, and metrics.
   - Add signed, task-bound page tokens and fingerprint validation so a page 
sequence cannot continue after its result changes.
   - Add coverage for pagination, token validation, snapshots, streaming 
output, slow readers, write timeouts, disconnects, and scheduler behavior.
   
   ## Verifying these changes
   
   - [ ] Trivial rework / code cleanup without any test coverage. (No Need)
   - [ ] Already covered by existing tests, such as *(please modify tests 
here)*.
   - [x] Need tests and can be verified as follows:
       - `mvn clean compile -Dmaven.javadoc.skip=true`
       - `mvn test -pl hugegraph-server/hugegraph-test -am -P unit-test 
-Dtest=TaskResultExceptionsTest,TaskResultGrizzlyIntegrationTest,TaskResultStreamingOutputTest,TaskResultPageTokenCodecTest,TaskResultSnapshotTest,TaskResultStreamerTest,TaskAndResultSchedulerTest
 -Dsurefire.failIfNoSpecifiedTests=false` (40 tests, 0 failures/errors)
       - `git diff --check`
   
   ## Does this PR potentially affect the following parts?
   
   - [ ] Dependencies ([add/update 
license](https://hugegraph.apache.org/docs/contribution-guidelines/contribute/#321-check-licenses)
 info & 
[regenerate_known_dependencies.sh](../install-dist/scripts/dependency/regenerate_known_dependencies.sh))
   - [x] Modify configurations
   - [x] The public API
   - [x] Other affects (task-result scheduling, storage reads, and stream 
metrics)
   - [ ] Nope
   
   ## Documentation Status
   
   - [x] `Doc - TODO`
   - [ ] `Doc - Done`
   - [ ] `Doc - No Need`


-- 
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]

Reply via email to