Re: [PR] Optimize load logic [iotdb]
jt2594838 merged PR #18153: URL: https://github.com/apache/iotdb/pull/18153 -- 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]
Re: [PR] Optimize load logic [iotdb]
luoluoyuyu commented on code in PR #18153:
URL: https://github.com/apache/iotdb/pull/18153#discussion_r3551034721
##
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadPathHelper.java:
##
@@ -255,6 +279,11 @@ private static void validateAttributeValue(final String
key, final String value)
case LoadTsFileConfigurator.VERIFY_KEY:
LoadTsFileConfigurator.validateVerifyParam(value);
break;
+ case USER_KEY:
+if (value == null || value.isEmpty()) {
+ throw new SemanticException("User name must not be empty");
Review Comment:
fixed
##
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadPathHelper.java:
##
@@ -208,7 +218,17 @@ public static boolean containsDatabaseName(final
Map attributes)
}
private static String formatSegment(final String key, final String value) {
-return key + SEGMENT_SEPARATOR + encodeValue(value);
+return key + SEGMENT_SEPARATOR + encodeValue(maskValueIfNecessary(key,
value));
+ }
+
+ private static String maskValueIfNecessary(final String key, final String
value) {
+if (!USER_KEY.equals(key)) {
+ return value;
+}
+return USER_VALUE_MASK_PREFIX
++ Base64.getUrlEncoder()
+.withoutPadding()
+.encodeToString(value.getBytes(StandardCharsets.UTF_8));
Review Comment:
fixed
--
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]
Re: [PR] Optimize load logic [iotdb]
jt2594838 commented on code in PR #18153:
URL: https://github.com/apache/iotdb/pull/18153#discussion_r3549638627
##
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadPathHelper.java:
##
@@ -255,6 +279,11 @@ private static void validateAttributeValue(final String
key, final String value)
case LoadTsFileConfigurator.VERIFY_KEY:
LoadTsFileConfigurator.validateVerifyParam(value);
break;
+ case USER_KEY:
+if (value == null || value.isEmpty()) {
+ throw new SemanticException("User name must not be empty");
Review Comment:
i18n
##
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadPathHelper.java:
##
@@ -208,7 +218,17 @@ public static boolean containsDatabaseName(final
Map attributes)
}
private static String formatSegment(final String key, final String value) {
-return key + SEGMENT_SEPARATOR + encodeValue(value);
+return key + SEGMENT_SEPARATOR + encodeValue(maskValueIfNecessary(key,
value));
+ }
+
+ private static String maskValueIfNecessary(final String key, final String
value) {
+if (!USER_KEY.equals(key)) {
+ return value;
+}
+return USER_VALUE_MASK_PREFIX
++ Base64.getUrlEncoder()
+.withoutPadding()
+.encodeToString(value.getBytes(StandardCharsets.UTF_8));
Review Comment:
Better to use Base32 since some file systems are case-insensitive,
--
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]
[PR] Optimize load logic [iotdb]
luoluoyuyu opened a new pull request, #18153: URL: https://github.com/apache/iotdb/pull/18153 ## Description As the title said This PR has: - [ ] been self-reviewed. - [ ] concurrent read - [ ] concurrent write - [ ] concurrent read and write - [ ] added documentation for new or modified features or behaviors. - [ ] added Javadocs for most classes and all non-trivial methods. - [ ] added or updated version, __license__, or notice information - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader. - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage. - [ ] added integration tests. - [ ] been tested in a test IoTDB cluster. # Key changed/added classes (or packages if there are too many classes) in this 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]
