[ 
https://issues.apache.org/jira/browse/GOBBLIN-1697?focusedWorklogId=808898&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-808898
 ]

ASF GitHub Bot logged work on GOBBLIN-1697:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Sep/22 22:49
            Start Date: 14/Sep/22 22:49
    Worklog Time Spent: 10m 
      Work Description: ZihanLi58 commented on code in PR #3549:
URL: https://github.com/apache/gobblin/pull/3549#discussion_r971361796


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/api/SpecStore.java:
##########
@@ -78,6 +78,16 @@ public interface SpecStore {
    */
   Spec updateSpec(Spec spec) throws IOException, SpecNotFoundException;
 
+  /***
+   * Update {@link Spec} in the {@link SpecStore} when current version is 
smaller than {@link version}.
+   * @param spec {@link Spec} to be updated.
+   * @param version largest version that current spec should be
+   * @throws IOException Exception in updating the {@link Spec}.
+   * @return Updated {@link Spec}.
+   * @throws SpecNotFoundException If {@link Spec} being updated is not 
present in store.
+   */
+  default Spec updateSpec(Spec spec, long version) throws IOException, 
SpecNotFoundException {return updateSpec(spec);};

Review Comment:
   If we are able to accept request from multi host, it's possible that two 
user try to modify same flow at the same time, especially for patch update, 
this version is introduced to avoid this situation, only the first update will 
go through, the second one will fail with the concurrent update exception.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 808898)
    Time Spent: 1h 10m  (was: 1h)

> Have a separate resource handler to rely on CDC stream to do message 
> forwarding
> -------------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1697
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1697
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to