{"record":{"id":"c7a2097b0b095122","repo":"apache/seatunnel","slug":"graph-operation-failed-c7a209","errorCode":"GRAPH_OPERATION_FAILED","errorMessage":"HugeGraph pagination marker did not advance for split '%s': '%s'","messagePattern":"HugeGraph pagination marker did not advance for split '(.+?)': '(.+?)'","errorType":"error_code","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/source/HugeGraphSourceReader.java","lineNumber":263,"sourceCode":"                    split.isShardMode()\n                            ? filterVerticesByLabel(page.getRecords(), label)\n                            : page.getRecords();\n            collectVertices(records, output, ctx);\n            recordCount = page.getRecords().size();\n            responsePage = page.getNextPage();\n        } else {\n            PageResult<Edge> page = fetchEdgePage(split, label, requestedPage);\n            List<Edge> records =\n                    split.isShardMode()\n                            ? filterEdgesByLabel(page.getRecords(), label)\n                            : page.getRecords();\n            collectEdges(records, output, ctx);\n            recordCount = page.getRecords().size();\n            responsePage = page.getNextPage();\n        }\n\n        if (responsePage != null && responsePage.equals(requestedPage)) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.GRAPH_OPERATION_FAILED,\n                    String.format(\n                            \"HugeGraph pagination marker did not advance for split '%s': '%s'\",\n                            split.splitId(), responsePage));\n        }\n\n        split.setLastEmittedId(this.lastEmittedId);\n        split.setPage(responsePage);\n        totalRecords += recordCount;\n        pageCount++;\n        if (recordCount == 0 && responsePage != null) {\n            LOG.debug(\n                    \"HugeGraph source received an empty intermediate page for split '{}'; continuing\",\n                    split.splitId());\n        }\n        if (responsePage == null) {\n            split.setFinished(true);\n            LOG.info(","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/source/HugeGraphSourceReader.java#L245-L281","documentation":"While paging through HugeGraph query results, the reader tracks the pagination marker (next-page token). If a response's next-page marker equals the one that was requested, pagination did not advance and the loop would spin forever, so readOnePage throws GRAPH_OPERATION_FAILED identifying the split and stuck marker.","triggerScenarios":"During pollNext() -> readOnePage(), the server returns a page whose getNextPage() equals the requested page marker, after records were collected, indicating the server is not advancing the cursor.","commonSituations":"HugeGraph server bug or degraded state returning stale pagination tokens; very large label/page combinations hitting server-side paging limits; repeated identical queries after server restart or pagination cache invalidation.","solutions":["Retry the job/split; transient server-side paging issues often resolve after the HugeGraph server recovers.","Reduce page size / scan scope so each request is smaller and less likely to hit the server paging bug.","Upgrade HugeGraph to a version with pagination fixes; check server logs for pagination errors.","Capture the split id and marker from the message and report/check the specific shard on the server."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// preflight: small paginated query works and advances\n// GET /graphs/<g>/gremlin with page limit and assert next != null differs across calls","typeGuard":null,"tryCatchPattern":"try {\n  reader.pollNext(...);\n} catch (HugeGraphConnectorException e) {\n  if (e.getErrorCode() == GRAPH_OPERATION_FAILED) {\n    // retry the split after backoff, or fail and let checkpoint restart the reader\n  }\n}","preventionTips":["Keep HugeGraph server up to date (pagination fixes).","Use reasonable page sizes to avoid server paging edge cases.","Monitor server logs for pagination/token errors.","Retry failed readers via checkpoint restart with backoff."],"tags":["source","pagination","reader","hugegraph"],"backgroundTag":"internal-invariant-violation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}