imbajin commented on code in PR #3116:
URL: https://github.com/apache/hugegraph/pull/3116#discussion_r3652556788


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/security/HugeSecurityManager.java:
##########
@@ -64,9 +64,7 @@ public class HugeSecurityManager extends SecurityManager {
             "file.separator",
             // Sofa
             "java.specification.version",
-            // MySQL
             "socksProxyHost",

Review Comment:
   ⚠️ These whitelist entries were introduced specifically for MySQL and 
PostgreSQL, but this change removes only their comments. In particular, 
retaining `socksProxyHost` continues exposing proxy/network metadata to Gremlin 
callers after those backends are gone. Please remove the legacy-only entries 
after verifying the supported backends, and add focused security-manager 
coverage.



##########
hugegraph-server/hugegraph-dist/src/test/java/org/apache/hugegraph/cmd/InitStoreTest.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hugegraph.cmd;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.hugegraph.HugeGraph;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class InitStoreTest {
+
+    @Test
+    public void testInitBackendFailsFastForPermanentException() throws 
Exception {
+        AtomicInteger invocations = new AtomicInteger();
+        IllegalArgumentException exception =
+                new IllegalArgumentException("Invalid backend configuration");
+        HugeGraph graph = (HugeGraph) Proxy.newProxyInstance(
+                HugeGraph.class.getClassLoader(), new 
Class<?>[]{HugeGraph.class},
+                (proxy, invokedMethod, args) -> {
+                    if (invokedMethod.getName().equals("initBackend")) {
+                        invocations.incrementAndGet();
+                        throw exception;
+                    }
+                    return null;
+                });
+
+        Method method = InitStore.class.getDeclaredMethod("initBackend",
+                                                          HugeGraph.class);
+        method.setAccessible(true);
+        long start = System.nanoTime();
+        try {
+            method.invoke(null, graph);
+            Assert.fail("Expected initialization to fail");
+        } catch (InvocationTargetException e) {
+            Assert.assertSame(exception, e.getCause());
+        }
+        long elapsed = (System.nanoTime() - start) / 1_000_000L;
+        Assert.assertTrue("Expected initialization to fail without retrying",

Review Comment:
   ⚠️ The invocation-count assertion already proves that this path does not 
retry. The additional one-second wall-clock threshold can fail under GC pauses 
or overloaded CI even when the implementation is correct. Please remove the 
timing measurement and keep the deterministic exception and call-count 
assertions.



##########
README.md:
##########
@@ -31,7 +31,7 @@ achieved through the powerful 
[Gremlin](https://tinkerpop.apache.org/gremlin.htm
 
 - **Schema Metadata Management**: VertexLabel, EdgeLabel, PropertyKey, and 
IndexLabel
 - **Multi-type Indexes**: Exact query, range query, and complex conditions 
combination query
-- **Plug-in Backend Store Framework**: Mainly supports `RocksDB`/`HStore` + 
`HBase`; other backends available in [legacy 
versions](https://hugegraph.apache.org/docs/download/download/) ≤ `1.5.0` 
(MySQL/PostgreSQL/Cassandra...)
+- **Plug-in Backend Store Framework**: Since `1.7.0`, supported backends are 
`RocksDB`, `HStore`, `HBase`, and `Memory`. Historical versions earlier than 
`1.7.0` also supported MySQL, PostgreSQL, Cassandra, ScyllaDB, and Palo.

Review Comment:
   🧹 Please synchronize the tracked Serena context with this inventory. 
`.serena/memories/architecture_and_modules.md` still reports 13 server 
submodules and lists the five modules deleted here; the related memory files 
retain the same stale module information. The committed `.serena/project.yml` 
also keeps ignore globs for those five nonexistent directories. HBase may 
remain marked and ignored as deprecated pending 2.0, but the already-deleted 
module entries should be removed and the module count updated to eight.



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