kazuyukitanimura commented on code in PR #3629:
URL: https://github.com/apache/datafusion-comet/pull/3629#discussion_r3041499148


##########
native/hdfs/src/object_store/hdfs.rs:
##########
@@ -387,7 +321,7 @@ impl ObjectStore for HadoopFileSystem {
                     drop(parts);
 
                     if is_directory {
-                        common_prefixes.insert(prefix.child(common_prefix));
+                        
common_prefixes.insert(prefix.clone().join(common_prefix));

Review Comment:
   Is it intentional to `clone`?



##########
native/core/src/execution/memory_pools/fair_pool.rs:
##########
@@ -132,10 +137,13 @@ impl MemoryPool for CometFairMemoryPool {
                 .pool_size
                 .checked_div(num)
                 .expect("overflow in checked_div");
-            let size = reservation.size();
-            if limit < size + additional {
+            // We use state.used instead of reservation.size() because 
DataFusion 53+
+            // calls pool.try_grow() before incrementing the reservation's 
atomic size,
+            // so reservation.size() would not include prior grows.
+            let used = state.used;
+            if limit < used + additional {
                 return resources_err!(
-                    "Failed to acquire {additional} bytes where {size} bytes 
already reserved and the fair limit is {limit} bytes, {num} registered"
+                    "Failed to acquire {additional} bytes where {used} bytes 
already reserved and the fair limit is {limit} bytes, {num} registered"

Review Comment:
   nit `already reserved` =? `already used`?



-- 
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