healchow commented on code in PR #8283:
URL: https://github.com/apache/inlong/pull/8283#discussion_r1234215984


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/group/InlongGroupRequest.java:
##########
@@ -49,8 +49,8 @@ public abstract class InlongGroupRequest extends 
BaseInlongGroup {
 
     @ApiModelProperty(value = "Inlong group id", required = true)
     @NotBlank(message = "inlongGroupId cannot be blank")
-    @Length(min = 4, max = 100, message = "length must be between 4 and 100")
-    @Pattern(regexp = "^[a-z0-9_.-]{4,100}$", message = "only supports 
lowercase letters, numbers, '-', or '_'")
+    @Length(min = 4, max = 256, message = "length must be between 4 and 256")

Review Comment:
   The design suggestion is to reserve a portion of the buffer for defining the 
field length in DB, and not fully utilize it to prevent unpredictable errors 
such as character transcoding.



##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/group/InlongGroupRequest.java:
##########
@@ -49,8 +49,8 @@ public abstract class InlongGroupRequest extends 
BaseInlongGroup {
 
     @ApiModelProperty(value = "Inlong group id", required = true)
     @NotBlank(message = "inlongGroupId cannot be blank")
-    @Length(min = 4, max = 100, message = "length must be between 4 and 100")
-    @Pattern(regexp = "^[a-z0-9_.-]{4,100}$", message = "only supports 
lowercase letters, numbers, '-', or '_'")
+    @Length(min = 4, max = 256, message = "length must be between 4 and 256")

Review Comment:
   In this case, the field length in the DB can be defined as 256, but the 
field length in user interaction is limited to 200, which is also a reasonable 
approach in terms of user understanding.



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

Reply via email to