You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/08/17 22:34:58 UTC

[GitHub] [beam] boyuanzz commented on a change in pull request #12578: [BEAM-10703] Prepare Dataflow Java runner for shardable states

boyuanzz commented on a change in pull request #12578:
URL: https://github.com/apache/beam/pull/12578#discussion_r471805132



##########
File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java
##########
@@ -357,7 +358,7 @@ public void invalidateCache() {
         }
       }
       activeReader = null;
-      stateCache.invalidate(key);
+      stateCache.invalidate(key, getWork().getShardingKey());

Review comment:
       the cachedReader is also keyed: https://github.com/apache/beam/blob/88acc5267f759d81e9836a9db17b9e0ee521c785/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java#L338-L340
   Should it also be keyed by sharedKey?

##########
File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorker.java
##########
@@ -2167,7 +2209,7 @@ public MapTask getMapTask() {
     }
 
     /** Mark the given key and work as active. */
-    public boolean activateWork(ByteString key, Work work) {
+    public boolean activateWork(ShardedKey key, Work work) {

Review comment:
       `shardedKey`?  

##########
File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorker.java
##########
@@ -2193,7 +2235,7 @@ public boolean activateWork(ByteString key, Work work) {
     }
 
     /** Marks the work for a the given key as complete. Schedules queued work for the key if any. */
-    public void completeWork(ByteString key, long workToken) {
+    public void completeWork(ShardedKey key, long workToken) {

Review comment:
       `sharedKey`?




----------------------------------------------------------------
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:
users@infra.apache.org