tflobbe commented on code in PR #1739:
URL: https://github.com/apache/solr/pull/1739#discussion_r1344515774


##########
solr/core/src/java/org/apache/solr/core/backup/BackupProperties.java:
##########
@@ -93,10 +108,25 @@ public static BackupProperties readFrom(
                 repository.openInput(backupPath, fileName, IOContext.DEFAULT)),
             StandardCharsets.UTF_8)) {
       props.load(is);
-      return new BackupProperties(props);
+      Map<String, String> extraProperties = extractExtraProperties(props);
+      return new BackupProperties(props, extraProperties);
     }
   }
 
+  private static Map<String, String> extractExtraProperties(Properties props) {
+    Map<String, String> extraProperties = new HashMap<>();
+    props.forEach(
+        (key, value) -> {
+          String entryKey = key.toString();
+          if (entryKey.startsWith(EXTRA_PROPERTY_PREFIX)) {
+            extraProperties.put(
+                entryKey.substring(EXTRA_PROPERTY_PREFIX.length()), 
String.valueOf(value));
+            props.remove(key);

Review Comment:
   Properties are backed by a ConcurrentHashMap, so it should be OK



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