You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "jaylisde (via GitHub)" <gi...@apache.org> on 2026/05/11 04:14:44 UTC

[PR] [GLUTEN-11915][VL] Support checksum-based shuffle writers for Spark 4.1 (SPARK-53322) [gluten]

jaylisde opened a new pull request, #12067:
URL: https://github.com/apache/gluten/pull/12067

   ## Summary
   
   Spark 4.1 introduced shuffle checksum end-to-end verification (SPARK-53322), requiring `MapStatus.checksumValue` to be non-zero and `.checksum` files to contain valid per-partition checksums. Gluten's `ColumnarShuffleWriter` was passing an empty checksum array to `writeMetadataFileAndCommit` and omitting the `checksumValue` parameter in `MapStatus`.
   
   **Fix:** After native shuffle write completes, read the data file (still in page cache) and compute per-partition checksums using the same algorithm as Spark's verification logic (`spark.shuffle.checksum.algorithm`, default ADLER32). Pass the checksums to `writeMetadataFileAndCommit` and an aggregated value to `MapStatus`.
   
   This is a pure Scala-layer fix — no C++/JNI changes required. The data file was just written by the native shuffle writer and remains in page cache, so the sequential read is effectively a memory operation with negligible overhead.
   
   ## Changes
   
   - `ColumnarShuffleWriter.scala`: Added `computePartitionChecksums()` method that reads the shuffle data file and computes per-partition checksums using `ShuffleChecksumHelper.getChecksumByAlgorithm()`. Respects `spark.shuffle.checksum.enabled` and `spark.shuffle.checksum.algorithm` configs.
   - `VeloxTestSettings.scala`: Enabled `GlutenMapStatusEndToEndSuite` (previously commented out).
   
   ## Test
   
   - `GlutenMapStatusEndToEndSuite` passes with default config (ansiFallback=true)
   - Verified with `-Dspark.gluten.sql.ansiFallback.enabled=false`: `ColumnarShuffleWriter` produces correct ADLER32 checksums
   
   Closes #11915


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "marin-ma (via GitHub)" <gi...@apache.org>.
marin-ma commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4619643864

   Apologies for missing this. @wForget @philo-he Thanks for the review. I will take a look today. Thanks!


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4427513276

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4427302649

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support checksum-based shuffle writers for Spark 4.1 (SPARK-54663) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4419226672

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "jaylisde (via GitHub)" <gi...@apache.org>.
jaylisde commented on code in PR #12067:
URL: https://github.com/apache/gluten/pull/12067#discussion_r3353274886


##########
gluten-ut/spark41/src/test/scala/org/apache/spark/sql/GlutenMapStatusEndToEndSuite.scala:
##########
@@ -28,5 +29,58 @@ class GlutenMapStatusEndToEndSuite extends MapStatusEndToEndSuite with GlutenTes
     _spark.sparkContext.conf
       .set(SQLConf.CLASSIC_SHUFFLE_DEPENDENCY_FILE_CLEANUP_ENABLED.key, "false")
     _spark.conf.set(SQLConf.CLASSIC_SHUFFLE_DEPENDENCY_FILE_CLEANUP_ENABLED.key, "false")
+
+    // Disable ANSI fallback to force Gluten's ColumnarShuffleWriter path.
+    _spark.conf.set("spark.gluten.sql.ansiFallback.enabled", "false")
+  }
+
+  import org.apache.spark.MapOutputTrackerMaster
+
+  private def getLatestShuffleChecksumValues(): Array[Long] = {
+    val tracker = _spark.sparkContext.env.mapOutputTracker
+      .asInstanceOf[MapOutputTrackerMaster]
+    val latestShuffleId = tracker.shuffleStatuses.keys.max
+    tracker.shuffleStatuses(latestShuffleId).mapStatuses.map(_.checksumValue)
+  }
+
+  test("Gluten row-based checksum is deterministic") {

Review Comment:
   Done - moved the two Gluten-specific tests into a new GlutenRowBasedChecksumSuite under `org.apache.spark.sql.gluten`. GlutenMapStatusEndToEndSuite is restored to a thin wrapper that only runs upstream Spark's MapStatusEndToEndSuite tests under Gluten. The new suite extends GlutenSQLTestsTrait directly and configures the required `SQLConfs / GLUTEN_ANSI_FALLBACK_ENABLED` via sparkConf. Thanks for the suggestion.



-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4618708462

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "jaylisde (via GitHub)" <gi...@apache.org>.
jaylisde commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4618748640

   > Looks good overall. Only some minor comments. Please check if they make sense. Thanks.
   
   Thanks @philo-he for reviewing.


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4427731053

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support checksum-based shuffle writers for Spark 4.1 (SPARK-53322) [gluten]

Posted by "jaylisde (via GitHub)" <gi...@apache.org>.
jaylisde commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4417986258

   Thanks @wForget for catching that! The correct reference  should be [SPARK-54663](https://issues.apache.org/jira/browse/SPARK-54663). I'll update the PR title and description.


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "jaylisde (via GitHub)" <gi...@apache.org>.
jaylisde commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4425775511

   Thanks @wForget. Updated to proper RowBasedChecksum (SPARK-51756) with native per-row XXH64 + order-independent aggregation. File-based checksum will be a follow-up PR.


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support checksum-based shuffle writers for Spark 4.1 (SPARK-54663) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4425703717

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4436699113

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support checksum-based shuffle writers for Spark 4.1 (SPARK-54663) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4425686268

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4436631204

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "jaylisde (via GitHub)" <gi...@apache.org>.
jaylisde commented on code in PR #12067:
URL: https://github.com/apache/gluten/pull/12067#discussion_r3353250561


##########
gluten-ut/spark41/src/test/scala/org/apache/gluten/utils/velox/VeloxTestSettings.scala:
##########
@@ -1027,7 +1027,7 @@ class VeloxTestSettings extends BackendTestSettings {
     .exclude("SPARK-49386: test SortMergeJoin (with spill by size threshold)")
   enableSuite[GlutenMathFunctionsSuite]
   // TODO: fix on Spark-4.1 see https://github.com/apache/spark/pull/50230

Review Comment:
   Done



-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "wForget (via GitHub)" <gi...@apache.org>.
wForget commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4493859222

   Thanks @jaylisde , overall looks good to me, could you fix the conflicts? cc @philo-he @marin-ma could you please review the native code?


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "wForget (via GitHub)" <gi...@apache.org>.
wForget commented on code in PR #12067:
URL: https://github.com/apache/gluten/pull/12067#discussion_r3231059518


##########
backends-velox/src/main/scala/org/apache/spark/shuffle/ColumnarShuffleWriter.scala:
##########
@@ -60,6 +60,14 @@ class ColumnarShuffleWriter[K, V](
 
   private val blockManager = SparkEnv.get.blockManager
 
+  private val rowBasedChecksumEnabled: Boolean = {
+    try {
+      GlutenMapStatusUtil.isRowBasedChecksumEnabled
+    } catch {
+      case _: NoSuchMethodError | _: NoSuchFieldError => false

Review Comment:
   We have created shim of `GlutenMapStatusUtil.isRowBasedChecksumEnabled` method for each spark version. Do we still need to catch NoSuchMethodError/NoSuchFieldError exceptions?



-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "philo-he (via GitHub)" <gi...@apache.org>.
philo-he commented on code in PR #12067:
URL: https://github.com/apache/gluten/pull/12067#discussion_r3346625358


##########
gluten-ut/spark41/src/test/scala/org/apache/spark/sql/GlutenMapStatusEndToEndSuite.scala:
##########
@@ -28,5 +29,58 @@ class GlutenMapStatusEndToEndSuite extends MapStatusEndToEndSuite with GlutenTes
     _spark.sparkContext.conf
       .set(SQLConf.CLASSIC_SHUFFLE_DEPENDENCY_FILE_CLEANUP_ENABLED.key, "false")
     _spark.conf.set(SQLConf.CLASSIC_SHUFFLE_DEPENDENCY_FILE_CLEANUP_ENABLED.key, "false")
+
+    // Disable ANSI fallback to force Gluten's ColumnarShuffleWriter path.
+    _spark.conf.set("spark.gluten.sql.ansiFallback.enabled", "false")
+  }
+
+  import org.apache.spark.MapOutputTrackerMaster
+
+  private def getLatestShuffleChecksumValues(): Array[Long] = {
+    val tracker = _spark.sparkContext.env.mapOutputTracker
+      .asInstanceOf[MapOutputTrackerMaster]
+    val latestShuffleId = tracker.shuffleStatuses.keys.max
+    tracker.shuffleStatuses(latestShuffleId).mapStatuses.map(_.checksumValue)
+  }
+
+  test("Gluten row-based checksum is deterministic") {

Review Comment:
   Test suites like GlutenMapStatusEndToEndSuite extend Spark's own test classes to run Spark tests with Gluten enabled. For the newly added tests here, if they aren't variants of existing tests in the parent Spark test class, it may be better to move them to a dedicated test suite. Could you do a refactor?



##########
gluten-ut/spark41/src/test/scala/org/apache/gluten/utils/velox/VeloxTestSettings.scala:
##########
@@ -1027,7 +1027,7 @@ class VeloxTestSettings extends BackendTestSettings {
     .exclude("SPARK-49386: test SortMergeJoin (with spill by size threshold)")
   enableSuite[GlutenMathFunctionsSuite]
   // TODO: fix on Spark-4.1 see https://github.com/apache/spark/pull/50230

Review Comment:
   Should we remove this comment?



-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4618708000

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4618780070

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "philo-he (via GitHub)" <gi...@apache.org>.
philo-he commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4435459213

   @marin-ma, could you take a look when you get a chance?


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support checksum-based shuffle writers for Spark 4.1 (SPARK-53322) [gluten]

Posted by "wForget (via GitHub)" <gi...@apache.org>.
wForget commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4417863395

   > Spark 4.1 introduced shuffle checksum end-to-end verification (SPARK-53322), requiring MapStatus.checksumValue to be non-zero and .checksum files to contain valid per-partition checksums.
   
   Do you mean https://issues.apache.org/jira/browse/SPARK-51756?


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support checksum-based shuffle writers for Spark 4.1 (SPARK-54663) [gluten]

Posted by "wForget (via GitHub)" <gi...@apache.org>.
wForget commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4418020150

   > Thanks @wForget for catching that. The correct reference should be [SPARK-54663](https://issues.apache.org/jira/browse/SPARK-54663). I'll update the PR title and description.
   
   SPARK-54663 proposes row-based checksum, but the current implementation is based on data file.
   


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4426224829

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "jaylisde (via GitHub)" <gi...@apache.org>.
jaylisde commented on code in PR #12067:
URL: https://github.com/apache/gluten/pull/12067#discussion_r3231099757


##########
backends-velox/src/main/scala/org/apache/spark/shuffle/ColumnarShuffleWriter.scala:
##########
@@ -60,6 +60,14 @@ class ColumnarShuffleWriter[K, V](
 
   private val blockManager = SparkEnv.get.blockManager
 
+  private val rowBasedChecksumEnabled: Boolean = {
+    try {
+      GlutenMapStatusUtil.isRowBasedChecksumEnabled
+    } catch {
+      case _: NoSuchMethodError | _: NoSuchFieldError => false

Review Comment:
   The try-catch was a leftover from before introducing the shim. Removed.



-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4494402160

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "jaylisde (via GitHub)" <gi...@apache.org>.
jaylisde commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4625155746

   Thanks @marin-ma. Column-buffer hashing isn't retry-deterministic as @wForget mentioned — Gluten splices per-partition column buffers across batches, so identical rows across retries can produce different buffer bytes. UnsafeRow is the data-semantics layer Spark's upstream RowBasedChecksum already uses, so Gluten and vanilla Spark checksums stay comparable.
   
   On perf: opt-in (spark.sql.shuffle.orderIndependentChecksum.enabled / ...checksum.mismatchFullRetry.enabled, both default false), only paid when debugging non-deterministic stages. Can add a microbench if useful.


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4427346576

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4427440529

   Run Gluten Clickhouse CI on x86


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "jaylisde (via GitHub)" <gi...@apache.org>.
jaylisde commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4494409858

   Thanks @wForget for the review. Fixed the conflicts.


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "wForget (via GitHub)" <gi...@apache.org>.
wForget commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4621907449

   > Hi @jaylisde I understand the checksum computation was introduced to resolve the data consistency issue with task retries, and we do lack this support for spark 4.0 in Gluten. But since Gluten's hash-based shuffle handles the data in columnar format, I wonder if it's possible to implement this based on each column buffer?
   
   The column buffer of shuffle write data is unstable; when upstream recalculates, using it to calculate checksun cannot guarantee that the same value will be generated.


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "marin-ma (via GitHub)" <gi...@apache.org>.
marin-ma merged PR #12067:
URL: https://github.com/apache/gluten/pull/12067


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [GLUTEN-11915][VL] Support RowBasedChecksum in ColumnarShuffleWriter (SPARK-51756) [gluten]

Posted by "marin-ma (via GitHub)" <gi...@apache.org>.
marin-ma commented on PR #12067:
URL: https://github.com/apache/gluten/pull/12067#issuecomment-4621570528

   Hi @jaylisde I understand the checksum computation was introduced to resolve the data consistency issue with task retries, and we do lack this support for spark 4.0 in Gluten. But since Gluten's hash-based shuffle handles the data in columnar format, I wonder if it's possible to implement this based on each column buffer? The conversion from columnar to row for the checksum computation looks expensive.


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org