瀏覽代碼

Enable keepalive by default (#587)

Signed-off-by: yhmo <yihua.mo@zilliz.com>
groot 1 年之前
父節點
當前提交
0fab000370

+ 3 - 1
src/main/java/io/milvus/param/ConnectParam.java

@@ -90,7 +90,7 @@ public class ConnectParam {
         private String uri;
         private String token;
         private long connectTimeoutMs = 10000;
-        private long keepAliveTimeMs = Long.MAX_VALUE; // Disabling keep alive
+        private long keepAliveTimeMs = 55000;
         private long keepAliveTimeoutMs = 20000;
         private boolean keepAliveWithoutCalls = false;
         private long rpcDeadlineMs = 0; // Disabling deadline
@@ -177,6 +177,7 @@ public class ConnectParam {
 
         /**
          * Sets the keep-alive time value of client channel. The keep-alive value must be greater than zero.
+         * Default is 55000 ms.
          *
          * @param keepAliveTime keep-alive value
          * @param timeUnit keep-alive unit
@@ -189,6 +190,7 @@ public class ConnectParam {
 
         /**
          * Sets the keep-alive timeout value of client channel. The timeout value must be greater than zero.
+         * Default value is 20000 ms
          *
          * @param keepAliveTimeout timeout value
          * @param timeUnit timeout unit

+ 1 - 1
src/main/java/io/milvus/param/dml/QueryParam.java

@@ -262,7 +262,7 @@ public class QueryParam {
          */
         public QueryParam build() throws ParamException {
             ParamUtils.CheckNullEmptyString(collectionName, "Collection name");
-            ParamUtils.CheckNullEmptyString(expr, "Expression");
+            ParamUtils.CheckNullString(expr, "Expression");
 
             if (travelTimestamp < 0) {
                 throw new ParamException("The travel timestamp must be greater than 0");

+ 0 - 9
src/test/java/io/milvus/client/MilvusServiceClientTest.java

@@ -2250,15 +2250,6 @@ class MilvusServiceClientTest {
                 .build()
         );
 
-        // empty expression
-        assertThrows(ParamException.class, () -> QueryParam.newBuilder()
-                .withCollectionName("collection1")
-                .withPartitionNames(partitions)
-                .withOutFields(outputFields)
-                .withExpr("")
-                .build()
-        );
-
         // negative travel time stamp
         assertThrows(ParamException.class, () -> QueryParam.newBuilder()
                 .withCollectionName("collection1")