kosiew commented on code in PR #20375:
URL: https://github.com/apache/datafusion/pull/20375#discussion_r2870612210


##########
datafusion/execution/src/disk_manager.rs:
##########
@@ -420,7 +420,8 @@ impl RefCountedTempFile {
         let global_disk_usage = 
self.disk_manager.used_disk_space.load(Ordering::Relaxed);
         if global_disk_usage > self.disk_manager.max_temp_directory_size {
             return resources_err!(
-                "The used disk space during the spilling process has exceeded 
the allowable limit of {}. Try increasing the `max_temp_directory_size` in the 
disk manager configuration.",
+                "The used disk space during the spilling process has exceeded 
the allowable limit of {}. \
+                Please try increasing the config: 
`datafusion.runtime.max_temp_directory_size`.",

Review Comment:
   `datafusion.runtime.max_temp_directory_size` is now part of user-facing 
messaging; centralizing it would reduce drift risk if keys are renamed or 
normalized elsewhere.



##########
datafusion/core/tests/memory_limit/mod.rs:
##########
@@ -602,10 +602,10 @@ async fn test_disk_spill_limit_reached() -> Result<()> {
         .await
         .unwrap();
 
-    let err = df.collect().await.unwrap_err();
-    assert_contains!(
-        err.to_string(),
-        "The used disk space during the spilling process has exceeded the 
allowable limit"
+    let error_message = df.collect().await.unwrap_err().to_string();
+    assert!(
+        error_message.contains("The used disk space during the spilling 
process has exceeded the allowable limit") &&
+            
error_message.contains("datafusion.runtime.max_temp_directory_size"),
     );

Review Comment:
   could simplify this into separate assertions (or iterate expected 
substrings) so failures clearly indicate which expected fragment is missing, eg
   ```
   for expected in [
         "The used disk space during the spilling process has exceeded the 
allowable limit",
         "datafusion.runtime.max_temp_directory_size",
      ] {
         assert!(
            error_message.contains(expected),....
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to