neilconway commented on code in PR #25935:
URL: https://github.com/apache/datafusion/pull/25935#discussion_r4156937395
##########
datafusion/core/tests/memory_limit/memory_limit_validation/utils.rs:
##########
@@ -70,15 +70,7 @@ where
);
if let Some(process) = sys.process(pid) {
let rss_bytes = process.memory();
- max_rss_clone
- .fetch_update(Ordering::Relaxed, Ordering::Relaxed,
|current| {
- if rss_bytes as usize > current {
- Some(rss_bytes as usize)
- } else {
- None
- }
- })
- .ok();
+ max_rss_clone.fetch_max(rss_bytes as usize, Ordering::Relaxed);
Review Comment:
This should be equivalent; `fetch_update` is deprecated and `fetch_max` is
more concise anyway.
--
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]