wangyang0918 commented on a change in pull request #13864:
URL: https://github.com/apache/flink/pull/13864#discussion_r517979743



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/ZooKeeperJobGraphStore.java
##########
@@ -63,35 +45,16 @@
  * <p>The root path is watched to detect concurrent modifications in corner 
situations where
  * multiple instances operate concurrently. The job manager acts as a {@link 
JobGraphListener}
  * to react to such situations.
+ *
+ * <p>NOTICE: The only reason we still have this class is that we need to 
release the lock. If we completely get
+ * rid of current lock-and-lease to avoid concurrent modification, like 
Kubernetes, then this class could be
+ * directly removed.
  */
-public class ZooKeeperJobGraphStore implements JobGraphStore {
-
-       private static final Logger LOG = 
LoggerFactory.getLogger(ZooKeeperJobGraphStore.class);
-
-       /** Lock to synchronize with the {@link JobGraphListener}. */
-       private final Object cacheLock = new Object();
-
-       /** The set of IDs of all added job graphs. */
-       private final Set<JobID> addedJobGraphs = new HashSet<>();
+public class ZooKeeperJobGraphStore extends DefaultJobGraphStore {

Review comment:
       If you prefer to add the `release` method in the `StateHandleStore` 
interface. I could change the current implementation. Of cause, it is easier to 
implement.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to