2010YOUY01 opened a new issue, #16040: URL: https://github.com/apache/datafusion/issues/16040
### Is your feature request related to a problem or challenge? When running an external query with `TrackConsumersPool`, when the memory pool runs out of memory and the error is unrecoverable, top memory consumers are displayed to help debug. ```sh # set memory limit to 20M and use a `TrackConsumersPool` wrapper > select * from generate_series(1,500000000) as t1(v1) order by v1; Resources exhausted: Additional allocation failed with top memory consumers (across reservations) as: ExternalSorterMerge[0]#2(can spill: false) consumed 31416320 bytes, DataFusion-Cli#0(can spill: false) consumed 0 bytes. Error: Failed to allocate additional 66560 bytes for ExternalSorterMerge[0] with 0 bytes already allocated for this reservation - 40960 bytes remain available for the total pool ``` To make the error message format better, I suggest to 1. Break each consumer to a single line 2. Use human readbale memory size https://github.com/apache/datafusion/blob/7a3d020af2a3736db11ba7477efc1a5dae96c2d3/datafusion/execution/src/memory_pool/mod.rs#L425 ``` Resources exhausted: Additional allocation failed with top memory consumers (across reservations) as: ExternalSorterMerge[0]#2(can spill: false) consumed 3.1MB, DataFusion-Cli#0(can spill: false) consumed 0 bytes. Error: Failed to allocate additional 66KB for ExternalSorterMerge[0] with 0 bytes already allocated for this reservation - 40KB remain available for the total pool ``` ### Describe the solution you'd like _No response_ ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org