zhouyejoe commented on code in PR #35906:
URL: https://github.com/apache/spark/pull/35906#discussion_r879901024


##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -210,8 +252,23 @@ private AppShufflePartitionInfo 
getOrCreateAppShufflePartitionInfo(
       File metaFile =
         appShuffleInfo.getMergedShuffleMetaFile(shuffleId, shuffleMergeId, 
reduceId);
       try {
-        return newAppShufflePartitionInfo(appShuffleInfo.appId, shuffleId, 
shuffleMergeId,
-          reduceId, dataFile, indexFile, metaFile);
+        AppShufflePartitionInfo appShufflePartitionInfo =
+            newAppShufflePartitionInfo(appShuffleInfo.appId, 
appShuffleInfo.attemptId,
+            shuffleId, shuffleMergeId, reduceId, dataFile, indexFile, 
metaFile);
+        if (db != null) {
+          try{
+            byte[] dbKey =
+                dbAppAttemptShufflePartitionKeyWithCustomPrefix(

Review Comment:
   Created two methods for two different types of DB writes. It is not that 
straightforward to get it generalized in one method.



-- 
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: reviews-unsubscr...@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to