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

   ## Purpose of the PR
   
   - Fixes the API test step of the `pd_store / hstore` job, which fails since 
#3366 on the PRs that run it (#3368, #3369).
   
   #3366 made `run-api-test.sh` start the Server twice on the same 
configuration: first without authentication for `CypherAnonymousApiTest`, then 
with it. `start-server.sh` appends its config lines on every call, so with 
hstore the `init-store.sh` of the second start reads `usePD` as `[true, true]`:
   
   ```
   Exception in thread "main" java.lang.IllegalArgumentException: Invalid value 
for key 'usePD': '[true, true]'
        at 
org.apache.hugegraph.config.HugeConfig.validateOption(HugeConfig.java:157)
   ```
   
   The CI of #3366 did not run the hstore job: the planner selects it for a 
`hugegraph-dist` path only when the path contains `pd`, `store` or 
`distributed`. No master push since then has touched PD or Store, so #3368 (run 
39031115954) and #3369 (run 39032643888) are the first to run the job after the 
merge, and both fail there. The last master run of the job that finished 
passed, at 92af2f89c on 2026-10-14.
   
   ## Main Changes
   
   - `start-server.sh` appends each config line only when the file does not 
already hold it (`append_once`, a whole-line `grep -qxF`). This covers 
`usePD=true` for hstore, the two hbase timeouts and 
`schema.sync_deletion=true`, which are appended the same way. rocksdb is not 
affected by the doubled `schema.sync_deletion` line, since no option is 
registered under that key (`server-rocksdb` passed on #3366).
   - The CI planner is left as it is. Changes to `run-api-test.sh` and 
`start-server.sh` still do not select the hstore job, so the CI of this PR does 
not run it either; the hstore run below is from a Linux host. Selecting hstore 
(and hbase) for these two scripts in `.github/scripts/ci-policy.py` would catch 
the next one. I can add that here or in a follow-up if wanted.
   
   ## 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:
       - `start-server.sh` run twice on one copy of the packaged `conf/`, with 
`init-store.sh` and `start-hugegraph.sh` stubbed, on macOS and on Ubuntu 24.04, 
2026-10-17. Count of each appended line in the config afterwards:
   
         | Backend | Line | master f5d9885a5 | this PR |
         |---|---|---|---|
         | hstore | `usePD=true` | 2 | 1 |
         | hbase | `restserver.request_timeout=200` and 
`gremlinserver.timeout=200` | 2 each | 1 each |
         | hstore, hbase, rocksdb | `schema.sync_deletion=true` | 2 | 1 |
   
       - The API test step of the hstore job, as `pd-store-ci.yml` runs it 
(`mvn clean package`, `install-backend.sh hstore`, then `run-api-test.sh hstore 
target/site/jacoco`), on Ubuntu 24.04 x86_64, JDK 17.0.20, 2026-10-17, with a 
fresh PD and Store for each run:
           - with the `start-server.sh` of master f5d9885a5: the first start 
and `CypherAnonymousApiTest` (2 run, 0 failures) pass, then the `init-store.sh` 
of the second start fails with `Invalid value for key 'usePD': '[true, true]'`, 
and `run-api-test.sh` exits 1.
           - with this change (ae42b68cd): both starts come up. 
`CypherAnonymousApiTest`: 2 run, 0 failures. API suite: 191 run, 0 failures, 0 
errors, 53 skipped. `run-api-test.sh` exits 0, and `rest-server.properties` 
holds `usePD=true` once.
   
   ## 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))
   - [ ]  Modify configurations
   - [ ]  The public API
   - [ ]  Other affects (typed here)
   - [x]  Nope
   
   
   ## Documentation Status
   
   Select one option and provide the documentation location when applicable.
   
   - [ ] `Doc - TODO`: required documentation is pending; complete it before 
merging.
   - [ ] `Doc - Done`: documentation is included here or linked below.
   - [x] `Doc - No Need`: no user-visible documentation is affected.
   
   Documentation files in this PR or paired hugegraph-doc PR:
   


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