Skip to content

Comments

[CELEBORN-2268] Improve test coverage for MEMORY and S3 storage#3608

Open
eolivelli wants to merge 10 commits intoapache:mainfrom
eolivelli:fix-eviction-apache
Open

[CELEBORN-2268] Improve test coverage for MEMORY and S3 storage#3608
eolivelli wants to merge 10 commits intoapache:mainfrom
eolivelli:fix-eviction-apache

Conversation

@eolivelli
Copy link
Contributor

What changes were proposed in this pull request?

This commit adds only tests and some useful debug information about using MEMORY and S3 storage.

Why are the changes needed?

Because there is not enough code coverage on some configurations that may happen in production, in particular about:

  • using MEMORY storage
  • using only S3 storage
  • using MEMORY with eviction to S3

There is an interesting case to test: when you configure MEMORY to S3 eviction and the dataset is small.
It is important to ensure that no file is created in S3

Does this PR resolve a correctness bug?

No

Does this PR introduce any user-facing change?

No

How was this patch tested?

It adds new integration tests

This commit adds only tests and some useful debug information about
using MEMORY and S3 storage.
.mapValues(locations => locations.size)
var offerSlotsMsg = s"Successfully offered slots for $numReducers reducers of $shuffleKey" +
s" on ${slots.size()} workers"
s" on ${slots.size()} workers, primary types: $primaryLocationsByType"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

when you have different spark jobs that select different storageTypes this log line is very useful, to quickly check that the client is doing what it is expected to do

} else {
} else if (StorageInfo.HDFSAvailable(availableStorageTypes)) {
storageInfo = new StorageInfo("", StorageInfo.Type.HDFS, availableStorageTypes);
} else if (StorageInfo.memoryAvailable(availableStorageTypes)) {
Copy link
Contributor Author

@eolivelli eolivelli Feb 22, 2026

Choose a reason for hiding this comment

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

this change is not strictly needed by this patch
but in some error conditions (in case I force the test to fail), when using MEMORY storage, you see PartitionLocations assigned to HDFS, even if HDFS is not configured.

I can move this to another PR, but I think it's relevant to this patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added unit tests to cover this method.
this is indeed important because with the new unit tests we are sealing the behavior of the master choosing the storage types depending on the specs

@eolivelli eolivelli changed the title [CELEBORN-CELEBORN-2268] Improve test coverage for MEMORY and S3 storage [CELEBORN-2268] Improve test coverage for MEMORY and S3 storage Feb 22, 2026
@@ -67,9 +68,9 @@ class BasicEndToEndTieredStorageTest extends AnyFunSuite

val s3url = container.getS3URL
val augmentedConfiguration = Map(
CelebornConf.ACTIVE_STORAGE_TYPES.key -> "MEMORY,S3",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed this existing test that I contribute some time ago to test only "S3", MEMORY was not really meant to be tested, it is better to make the test simpler in order to prevent confusion to readers

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 66.86%. Comparing base (2dd1b7a) to head (33a6de3).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
...g/apache/celeborn/common/protocol/StorageInfo.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3608      +/-   ##
==========================================
- Coverage   67.13%   66.86%   -0.26%     
==========================================
  Files         357      357              
  Lines       21860    21967     +107     
  Branches     1943     1949       +6     
==========================================
+ Hits        14674    14687      +13     
- Misses       6166     6264      +98     
+ Partials     1020     1016       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant