You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/03/07 10:26:12 UTC

[GitHub] [flink] rkhachatryan commented on a change in pull request #18976: [FLINK-26485][state/changelog] Discard unnecessarily uploaded state

rkhachatryan commented on a change in pull request #18976:
URL: https://github.com/apache/flink/pull/18976#discussion_r820568630



##########
File path: flink-dstl/flink-dstl-dfs/src/test/java/org/apache/flink/changelog/fs/TestingStateChangeUploader.java
##########
@@ -26,22 +27,30 @@
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
+import static java.util.Collections.emptyMap;
 import static java.util.stream.Collectors.toList;
 
 class TestingStateChangeUploader implements StateChangeUploader {
     private final Collection<StateChangeSet> uploaded = new CopyOnWriteArrayList<>();
-    private final List<UploadTask> tasks = new CopyOnWriteArrayList<>();
+    private final List<UploadTask> tasks;
     private boolean closed;
 
+    TestingStateChangeUploader() {
+        tasks = new CopyOnWriteArrayList<>();

Review comment:
       Depending on the test setup, its `upload` method can be called by a dedicated upload thread, and other accesses are from the main thread (e.g. `BatchingStateChangeUploadSchedulerTest`).




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org