umustafi commented on code in PR #3857:
URL: https://github.com/apache/gobblin/pull/3857#discussion_r1450900113


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/api/FlowSpec.java:
##########
@@ -125,6 +128,19 @@ public static FlowSpec.Builder builder(URI catalogURI, 
Properties flowProps) {
     }
   }
 
+  /**
+   * Add property to Config (also propagated to the Properties field)
+   * @param key
+   * @param value
+   */
+  public void addProperty(String key, String value) {

Review Comment:
   I added the `volatile` keyword and note about accessing both parameters with 
synchronized key word if multi-threaded access (which is unlikely since we'd 
probably only access one not both). When trying to use synchronized keyword on 
the two functions it results in a number of `Inconsistent synchronization of 
org.apache.gobblin.runtime.api.FlowSpec.config; locked 50% of time` errors so I 
had to remove the `@Data` annotation for the class and would have to add 
separate `@Getter/Setter/toString` etc... annotations for all the fields to 
make only `Config/ConfigAsProperties` synchronized. I don't think this is that 
useful so made the compromise above. Let me know.



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