Skip to content

[#2544] fix(client): NPE about StatisticsCodec #2547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2025

Conversation

SalvadorRomo
Copy link
Contributor

@SalvadorRomo SalvadorRomo commented Jul 20, 2025

What changes were proposed in this pull request?

Converting List<codeCost> into a synchronize list

Why are the changes needed?

this bugs happened in concurrent environment when spark workers with the RssShuffleManager and spark.rss.client.io.compression.statisticsEnabled property enabled, logs its compression statistics when finished, but since the class was not prepared for concurrent enviroment, at the time to call List<codeCost> into the codec.statistics() methods enters in a race condition.

Fix: # 2544

Does this PR introduce any user-facing change?

No.

How was this patch tested?

this issue was diffcult to replicate into a local enviroment, but instead when the patch was applied, i make sure the application continue working as usual by:
1- deploying the application based on ./deploy/docker/read.me
2- when executing the spark-shell make sure to do it by including the spark.rss.client.io.compression.statisticsEnabled props as follow:


docker exec -it rss-spark-master-1 /opt/spark/bin/spark-shell \
   --master spark://rss-spark-master-1:7077 \
   --conf spark.serializer=org.apache.spark.serializer.KryoSerializer \
   --conf spark.shuffle.manager=org.apache.spark.shuffle.RssShuffleManager \
   --conf spark.rss.coordinator.quorum=rss-coordinator-1:19999,rss-coordinator-2:19999 \
   --conf spark.rss.storage.type=MEMORY_LOCALFILE \
   --conf spark.speculation=true \
   --conf spark.rss.client.io.compression.statisticsEnabled=true

3- run multipe spark scala jobs
4- when finishing, into each worker, look for the logs in /opt/spark/work/...
5- looks for every entry in the file that succesfully logs the statistics.

@SalvadorRomo SalvadorRomo changed the title fix NPE [#2544][Bug] NPE about StatisticsCodec Jul 21, 2025
@jerqi jerqi requested a review from zuston July 22, 2025 07:20
Copy link

github-actions bot commented Jul 22, 2025

Test Results

 3 082 files  ±0   3 082 suites  ±0   6h 48m 37s ⏱️ -26s
 1 191 tests ±0   1 190 ✅ +1   1 💤 ±0  0 ❌  - 1 
15 100 runs  ±0  15 085 ✅ +1  15 💤 ±0  0 ❌  - 1 

Results for commit 6e48950. ± Comparison against base commit f1323ab.

♻️ This comment has been updated with latest results.

@zuston zuston changed the title [#2544][Bug] NPE about StatisticsCodec [#2544] fix(client): NPE about StatisticsCodec Jul 22, 2025
zuston
zuston previously approved these changes Jul 22, 2025
Copy link
Member

@zuston zuston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply, that I'm busy for working.

This PR looks good to me. And I will validate this in our production cluster. Thanks for your contribution! @SalvadorRomo

Welcome to the uniffle community! 🎉

@zuston
Copy link
Member

zuston commented Jul 22, 2025

And you could format your code by the following command

mvn spotless:apply -Pspark3 -Pspark2 -Ptez -Pmr -Phadoop2.8

@zuston zuston linked an issue Jul 23, 2025 that may be closed by this pull request
3 tasks
@zuston zuston merged commit 4629fc6 into apache:master Jul 23, 2025
41 checks passed
@zuston
Copy link
Member

zuston commented Jul 23, 2025

Merged @SalvadorRomo . Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] NPE about StatisticsCodec
2 participants