You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "ion-elgreco (via GitHub)" <gi...@apache.org> on 2024/06/13 16:14:40 UTC

[I] error decoding response body after upgrade to object store 0.10 [arrow-rs]

ion-elgreco opened a new issue, #5882:
URL: https://github.com/apache/arrow-rs/issues/5882

   **Describe the bug**
   We bumped the object store to 0.10 in delta-rs, and now we already seeing a couple reports on the following error `error decoding response body`.  Happens on Azure and S3.
   
   See https://github.com/delta-io/delta-rs/issues/2595  and https://github.com/delta-io/delta-rs/issues/2592
   
   **To Reproduce**
   Seems to occur when reading tables or doing operations on them.
   
   **Expected behavior**
   Don't have an issue decoding the response body
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->


-- 
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-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2338012975

   > > If we identify the CPU intensive sections of Datafusion and use `spawn_blocking` combined with a channel we could move all the blocking tasks to that separate threadpool and use the default tokio threadpool for IO.
   > 
   > If we did this I think it is important to do performance tests -- by default tokio potentially uses many (100s I think?) of threads for this blocking thread pool and if we are not careful launching CPU bound work on them will mean the threads are over subscribed (more threads than CPUs) which will reduce effectiveness
   > 
   > 
   > 
   > > This is what we do at InfluxData and it works reasonably well. You have to be slightly careful so that you don't miss some IO calls or that you don't hand IO handles (e.g. sockets, or HTTP connections wrapping them) from the IO runtime to the CPU runtime.
   > 
   > It would be really helpful to document / write a blog about how this works -- I think it would be widely read and appreciated. @ion-elgreco  any interest / chance that you or someone else in the delta lake team would be able to? I would be happy to collaborate.
   
   @alamb  what's the question exactly?
   
   Currently our logstore is spawning all tasks in a separate runtime that can be configured 


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "crepererum (via GitHub)" <gi...@apache.org>.
crepererum commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2340037342

   I think there's something else going on that is independent of the tokio runtime issues. I was able to reproduce this locally with a somewhat broken `kubectl port-forward` (which is kinda famous for it's unstable connection handling when transferring large amounts of data). I'm hitting the same error case, and it is NOT retried at all. It seems that this is this error case here:
   
   https://github.com/seanmonstar/reqwest/blob/09884ed0a09d43ebd5c67491caf4ad5683fba995/src/error.rs#L191
   
   So I think we should extend the retry logic to capture this case.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2733526640

   I am convinced that this issue  / error would be solved by retrying stream on errors
   - https://github.com/apache/arrow-rs/issues/7242


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288596803

   I see that could explain it for me, however my colleague saw timeouts on his Azure Compute instance, so  Azure <-> Azure connection within our vnet


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "Tangeroooo (via GitHub)" <gi...@apache.org>.
Tangeroooo commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2699743317

   I've got the same error when I using ParquetRecordBatchStream with ParquetObjectReader. I found that it may relate to file size. When I try to read file size bigger than 335MB, reading file fails always. Not fail with until 335MB.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288380454

   Hmm I am not sure, I started working on delta-rs a year ago and most of this FileSystem handling code was already there.
   
   We essentially create a DeltaFileSystemHandler which we expose to Python. In python we create a DeltaStorageHandler which inherits the pyarrow FileSystemHandler methods, which we implement to call the Rust DeltaFileSystemHandler.
   
   I think Pyarrow just calls read on an ObjectInputFile, which in rust calls `get_range` on the underlying object-store (https://github.com/delta-io/delta-rs/blob/c446b1287dedba122b941d8d1d4ae6290aa86d5c/python/src/filesystem.rs#L467-L495)
   
   ```
       fn read<'py>(&mut self, nbytes: Option<i64>, py: Python<'py>) -> PyResult<Bound<'py, PyBytes>> {
           self.check_closed()?;
           let range = match nbytes {
               Some(len) => {
                   let end = i64::min(self.pos + len, self.content_length) as usize;
                   std::ops::Range {
                       start: self.pos as usize,
                       end,
                   }
               }
               _ => std::ops::Range {
                   start: self.pos as usize,
                   end: self.content_length as usize,
               },
           };
           let nbytes = (range.end - range.start) as i64;
           self.pos += nbytes;
           let data = if nbytes > 0 {
               py.allow_threads(|| {
                   rt().block_on(self.store.get_range(&self.path, range))
                       .map_err(PythonError::from)
               })?
           } else {
               "".into()
           };
           // TODO: PyBytes copies the buffer. If we move away from the limited CPython
           // API (the stable C API), we could implement the buffer protocol for
           // bytes::Bytes and return this zero-copy.
           Ok(PyBytes::new_bound(py, data.as_ref()))
   ```
   
   Here `rt()` just creates a runtime if it doesn't exist yet


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288741297

   > How fast do you think https://github.com/apache/arrow-rs/issues/6248 could land?
   
   I've based out https://github.com/apache/arrow-rs/issues/6248, I don't have time to add tests but perhaps we don't need them - I'll leave that to the reviewers to determine.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2340084163

   That is tracked by https://github.com/apache/arrow-rs/issues/6287
   
   _I'm a bit wary of this ticket just becoming a general dumping ground for any networking related issue, which is part of why I closed it..._


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2169174342

   Please also print the source of the error via `Debug` print. Usually, it should be caused by `connection reset` or similar network related errors.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2340157070

   Ok so here is my summary of this ticket, and the action items going forward.
   
   **Problem**
   
   The `error decoding response body` error occurs whenever an HTTP request body is interrupted whilst streaming the response body. This is **after** the HTTP status code has been returned and determined to be OK. I am not aware of any object stores using HTTP trailers to indicate errors, they just terminate the request. We do not currently support retrying request interrupted mid-stream in this way, and there are complexities involved in supporting this (#6287).
   
   **Causes**
   
   There are two related causes of this:
   
   1. Mixing IO and CPU on the same runtime, stalling out IO and causing the server to hangup - https://github.com/apache/arrow-rs/issues/5882#issuecomment-2298644856
   2. An unstable network connection through some sort of proxy or VPN - https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288583692 https://github.com/apache/arrow-rs/issues/5882#issuecomment-2340037342
   
   **Outcome**
   
   As for the follow on work:
   
   * The upstream fix for 1. is tracked by https://github.com/apache/datafusion/issues/12393
   * #6377 tracks improving the error message to provide more context
   * #6287 tracks retrying interrupted streaming requests
   
   Please let me know if I have missed anything, otherwise I will look to close this issue in favour of the linked issues in the next few days. I think this issue has been very helpful, and I'm grateful for everyone who has participated, but I am keen to put this on a more actionable footing.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2341543483

   What I still don't quite get is that we are still seeing errors but only on the reading side through the DeltaFileHandler which is exposed into a pyarrow filesystem


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2336406364

   If I understand correctly the point is that we don't want to move CPU work somewhere because that's happening in too many places to keep track. Instead we want to "special case" the IO work and move that around. Is that right?


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288609375

   I'm afraid I don't have any other ideas, something outside of object_store is dropping the connection. This could be Azure itself, Azure blob storage definitely gives off the impression of being an MVP that somehow got shipped, but it is more likely to be some middleware network appliance, like a VPN, NAT gateway or similar.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "crepererum (via GitHub)" <gi...@apache.org>.
crepererum commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2290863644

   To me it's an open question if every single `object_store` user should work around this tokio quirk or if we should have a generic solution within `object_store`, like #4015.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288593022

   >  VPN connection
   
   Oh... This is almost certainly what is causing this issue, very few VPNs will support large volume data transfer. It is almost certainly dropping the connections in the interest of preserving QoS for other users. Shuttling data through a VPN box is not only likely to be the cause of your issue, it is also likely very expensive.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288643623

   You should avoid doing _any_ non-trivial CPU-bound work on the tokio threadpool that you use for IO. The way I've seen this done successfully is running DF in one tokio threadpool, and then spawning IO from it into a different one. There was some work in the past to make this easier, see https://github.com/apache/arrow-rs/pull/4040, but I never got it over the line. I'll file a ticket


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2293625397

   One thing that might help is to disable IO in the tokio runtime used by DataFusion. Attempts to perform IO will then error out. It isn't completely reliable, as it won't catch issues where say the DF runtime is applying backpressure to IO, but it will catch obvious issues.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "zalmane (via GitHub)" <gi...@apache.org>.
zalmane commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2337949140

   Just experienced this issue as well. This is an Azure VM accessing Azure blob storage. Happens intermittently. We have 60 tasks running in parallel and happens ocassionally and retrying resolves it. We set the pyarrow io thread count to 2 and cpu thread count to 1 on a machine with 120 vCPUs.
   Using pyarrow 15 and delta-rs 19.2 (although the error is from arrow-rs so seems unrelated to delta).
   Any suggestions for a workaround?


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #5882: `error decoding response body` after upgrade to object store 0.10
URL: https://github.com/apache/arrow-rs/issues/5882


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "crepererum (via GitHub)" <gi...@apache.org>.
crepererum commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2340138876

   Error display improvements tracked by #6377.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2335134174

   > If we identify the CPU intensive sections of Datafusion and use spawn_blocking combined with a channel we could move all the blocking tasks to that separate threadpool and use the default tokio threadpool for IO.
   
   I think the challenge for DataFusion is that almost all of its processing is CPU bound, so it makes more sense to move it wholesale to its own threadpool.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "crepererum (via GitHub)" <gi...@apache.org>.
crepererum commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2291123529

   > Another way to help people avoid said footgun is with documentation / examples. Maybe we can make an example in datafusion showing how to use a second thread pool.
   
   FWIW the tokio threadpool setup in IOx is not exactly trivial and far more than what I would consider "documentation" or an "example". I think we shouldn't require users to copy ANY example to get a sane default setup. Furthermore, the compute-IO bridge is rather tricky to get right as a user because you have to be very careful to not accidentally violate it. So I kinda think that an explicit support within DF (or any other compute framework) would help a lot.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288442053

   That at least looks plausible, how big are the ranges we're fetching and how long are we fetching for? I wonder if we're running into some Azure limit, it sounds like they're hanging up for some reason


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288458712

   > What do you mean with looks plausible? 
   
   I can't see anything obviously wrong, but also don't know much about pyarrow so can't say definitively if it is correct


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288308942

   @Xuanwo @tustvold I can concur this also happens to us in v0.18.1/2, I can see logs in LakeFS which says "context canceled".
   
   Somewhere in object store the connection is getting dropped constantly with large files. Can you guys give suggestions on how to debug.
   
   For me I am connecting within a VNET in EU amsterdam


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2293618784

   Indeed I have encountered this. Like @tustvold says it's not just object storage, any other IO will be impacted, and currently there's nothing to stop you from shooting yourself in the foot. It's also hard to detect when you do.
   
   I don't have any suggestions currently for the right APIs to do this, frankly I'm not 100% confident I've addressed the problem completely in my use case as it seems tricky to get right. I feel like it would be hard to completely eliminate the foot gun from an API perspective, so maybe the best we can do is provide APIs to work around it + detect when it's happening.
   
   I wonder if we could do something like have DataFusion's CPU runtime be some specialized runtime that requires a trait bound on futures? No idea if that's possible. But basically prohibit you from doing async stuff that hasn't opted into the CPU runtime on the CPU runtime.
   
   It would also be nice to have documentation on how to check when this happens (using Tokio metrics to detect stalled async tasks?). I'm not completely sure how to do this but if there were a "guide to debugging your DataFusion app for CPU blocking IO" that would be immensely helpful not just to DataFusion users but to async Rust users in general.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2341849550

   @alamb https://github.com/delta-io/delta-rs/issues/2595#issuecomment-2341845691
   
   I asked them to add a timeout increase and that resolved it, i guess it would already help a lot if the true error surfaces, it might be all those folks have low network throughput


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2169174923

   @thomasfrederikhoeck @k-ye can you guys provide additional details please


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "thomasfrederikhoeck (via GitHub)" <gi...@apache.org>.
thomasfrederikhoeck commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288624368

   > @Xuanwo I might be network related but I have some feeling that is related to how `object_store` or `delta-rs` handles if there is a lower throughput than within a Azure data center (some connections going stale while waiting for somthing else).
   > 
   > * Running from local laptop in Europe
   > * Azure region is Westeurope
   > * I just benchmarked with `azcopy bench "https://ACCOUNT.blob.core.windows.net/CONTAINER?SAS" --file-count 20 --size-per-file 10000M`. So 20 files of 10 Gb and here I get a throughput of 145 Mb/s. It runs through with no failures.
   > 
   > The benchmark took 1+ hours with no failure while the delta-rs call fails within a few minutes.
   
   @tustvold The weird thing is that I can run some rather large data opeartions (taking an 1+ hour)  with `azcopy bench` without seeing any dropped connection or something like that. 
   
   I can maybe add: Before [this PR](https://github.com/pola-rs/polars/pull/15083/files ) in polars we sometimes saw similar issues but I'm very far from knowledge-able on networking.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288776456

   I think filing an issue in DataFusion would be worthwhile. I did try to switch it to rayon a while back but in the end gave up, I think having a better story for avoiding this class of issue would be very valuable. I know InfluxData has run into significant issues in this area


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2337966221

   I've created https://github.com/apache/datafusion/issues/12393 to track this on DataFusion's end.
   
   I am also going to close this issue, as I don't believe there is any work planned in this repository related to this, ultimately the issue lies in how DataFusion and its consumers are wiring up IO.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "zalmane (via GitHub)" <gi...@apache.org>.
zalmane commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2337997341

   Why is this being closed? We are experiencing this bug on pyarrow/arrow-rs without Datafusion.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2338043588

   > @alamb what's the question exactly?
   > 
   > Currently our logstore is spawning all tasks in a separate runtime that can be configured
   
   My question is "would you be willing to summarize this ticket / write up a blog post (perhaps on the DataFusion blog) explaining how to spawn IO related tasks on a different thread pool?
   
   I am 🎣 for help as I would like to write this blog too (so we can distill down this ticket and others for future discussion) but I am struggling to find time


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2341874447

   > @alamb [delta-io/delta-rs#2595 (comment)](https://github.com/delta-io/delta-rs/issues/2595#issuecomment-2341845691)
   > 
   > I asked them to add a timeout increase and that resolved it, i guess it would already help a lot if the true error surfaces, it might be all those folks have low network throughput
   
   I believe @itsjunetime may be able to take a look at improving the errors and retries. We'll keep the tickets updated


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "crepererum (via GitHub)" <gi...@apache.org>.
crepererum commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2700954147

   @Tangeroooo I think we're open for contributions to fix that. The essence is described in https://github.com/apache/arrow-rs/pull/6519#issuecomment-2621505087 or in my words: The `object_store` interface returns a stream of data. If that stream fails midway (e.g. because there's a timeout or a network glitch), retrying would need to make a new request with a new range starting after the last received byte and ideally also an ETAG/version check to ensure that the object that is returned by the retry is the the one that was already "in flight". This retry mechanic is obviously chaining/nested, i.e. if the retry fails mid-stream, you wanna have yet another retry that picks up the where the previous one ended. So long store short: People agree that this would be a good feature to have, but it requires a proper implementation.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2169165928

   I think we would need a reproducer to action this, the linked issues aren't even clearly implicating object_store


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2298644856

   Just a short update @tustvold 
   
   I've separated the IO in another Runtime now here: https://github.com/delta-io/delta-rs/pull/2789, which is available in deltalake 0.19.1
   
   @thomasfrederikhoeck confirmed for his use case (optimize) where delta-rs only does work on the Rust side is working fine now. So thanks for the tips :)
   
   It seems that reading though and then passing data to PyArrow might still fail. One user reported to see failures now that look like C++ errors  :S 
   
   https://github.com/delta-io/delta-rs/issues/2595#issuecomment-2298370904 :
   > > @k-ye can you try deltalake 0.19.1 please and report back if you see improvements
   > 
   > I've done a few tests:
   > 
   > * On a U.S. machine (but not on AWS), this generally works now. Occasionally it was able to finish the script execution, but the process ended with
   > 
   > ```
   > terminate called without an active exception
   > Aborted
   > ```
   > 
   > * On a CN machine behind a VPN, I could still bump into this error, though.
   
   


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "leoyvens (via GitHub)" <gi...@apache.org>.
leoyvens commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288753850

   I don't have a reproduction case, but I can report that I also started getting this after updating. I'm using `object_store` through DataFusion. Does DataFusion suffer from mixing object store IO and CPU work, in its default settings? If this is for integrators to solve, is there an issue tracking a DataFusion-level solution?


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2291503520

   > > I definitely think it is a massive footgun that DataFusion's async APIs lure people into performing IO on the same runtime as CPU-bound tasks. My ideal outcome would be that you could just use DataFusion from a regular tokio threadpool, and it would spawn any potentially CPU-bound work off to its internally managed threadpool, but that is likely a non-trivial undertaking.
   > 
   > Another way to help people avoid said footgun is with documentation / examples. Maybe we can make an example in datafusion showing how to use a second thread pool.
   
   Would be easy to miss though, if it can be part of the API it makes it easier to not fall in this trap 


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2291096170

   > I definitely think it is a massive footgun that DataFusion's async APIs lure people into performing IO on the same runtime as CPU-bound tasks. My ideal outcome would be that you could just use DataFusion from a regular tokio threadpool, and it would spawn any potentially CPU-bound work off to its internally managed threadpool, but that is likely a non-trivial undertaking.
   
   Another way to help people avoid said footgun is with documentation / examples. Maybe we can make an example in datafusion showing how to do this.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288543613

   @tustvold It seems pyarrow fetches 4 files in parallel: 
   
   ```rust
   [python/src/filesystem.rs:362:9] (&path, &size) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-0.parquet",
       },
       Some(
           620044497,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-0.parquet",
       },
       Some(
           65536,
       ),
   )
   [python/src/filesystem.rs:362:9] (&path, &size) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-1.parquet",
       },
       Some(
           620155928,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-1.parquet",
       },
       Some(
           65536,
       ),
   )
   [python/src/filesystem.rs:362:9] (&path, &size) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-2.parquet",
       },
       Some(
           620114967,
       ),
   )
   [python/src/filesystem.rs:362:9] (&path, &size) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-3.parquet",
       },
       Some(
           620122700,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-2.parquet",
       },
       Some(
           65536,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-3.parquet",
       },
       Some(
           65536,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-0.parquet",
       },
       Some(
           401745,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-1.parquet",
       },
       Some(
           401786,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-2.parquet",
       },
       Some(
           401778,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-1.parquet",
       },
       Some(
           33242725,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-3.parquet",
       },
       Some(
           401785,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-2.parquet",
       },
       Some(
           33248200,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-1.parquet",
       },
       Some(
           32602849,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-0.parquet",
       },
       Some(
           33231119,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-1.parquet",
       },
       Some(
           33227648,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-2.parquet",
       },
       Some(
           32612159,
       ),
   )
   [python/src/filesystem.rs:471:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-0.parquet",
       },
       Some(
           32593580,
       ),
   )
   ```


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288453734

   What do you mean with looks plausible? :) 
   
   @tustvold I'll put some print statements in the ranges, to see what is being requested! Will get back to you on that! 


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2340257909

   > > @alamb what's the question exactly?
   > > 
   > > Currently our logstore is spawning all tasks in a separate runtime that can be configured
   > 
   > My question is "would you be willing to summarize this ticket / write up a blog post (perhaps on the DataFusion blog) explaining how to spawn IO related tasks on a different thread pool?
   > 
   > I am 🎣 for help as I would like to write this blog too (so we can distill down this ticket and others for future discussion) but I am struggling to find time
   
   I could but not soon, I recently started a new job so that's keeping me quite busy


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2186051156

   > @Xuanwo I would love to be of more help but I don't now how to do this in delta-rs (an in turn object_store). I didn't help setting the timeout to 300s.
   
   Hi, if you can consistently reproduce this issue, please make the following changes:
   
   https://github.com/delta-io/delta-rs/blob/d17ed97b5bda0cadbc0df959f8fb38e275570c87/python/src/error.rs#L41-L51
   
   ```shell
   fn object_store_to_py(err: ObjectStoreError) -> PyErr {
       match err {
           ObjectStoreError::NotFound { .. } => PyFileNotFoundError::new_err(err.to_string()),
           ObjectStoreError::Generic { source, .. }
               if source.to_string().contains("AWS_S3_ALLOW_UNSAFE_RENAME") =>
           {
               DeltaProtocolError::new_err(source.to_string())
           }
           _ => PyIOError::new_err(err.to_string()),
       }
   }
   ```
   
   Don't use `err.to_string()`, print it's debug message instead.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2292272877

   If someone can come up with an easier to use API I am all for it.
   
   I think the idea of DataFusion trying to manage its own threadpool is an interesting idea. It is my opinion that any API to do so needs to give the user tight control over that other threadpool (how many threads, priorities, etc)
   
   I believe @adriangb  recently was working on something similar (with DataFusion) so maybe he has something to share too. 


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "crepererum (via GitHub)" <gi...@apache.org>.
crepererum commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2296019371

   > One thing that might help is to disable IO in the tokio runtime used by DataFusion. Attempts to perform IO will then error out.
   
   This is what we do for IOx, but be aware that this isn't 100% reliable. For example you can open a TCP connection in the IO runtime and then poll it directly from the CPU/DF runtime. If that TCP connection is something that is multiplexed (like HTTP/2), you probably end up with the same mess than if you would do IO within the DF runtime directly.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2338002449

   > We are experiencing this bug on pyarrow/arrow-rs without Datafusion
   
   delta-rs makes use of DataFusion


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2338037789

   Let's leave this ticket open until we sort out the next steps (though I agree with @tustvold  that I don't predict any code changes in arrow-rs)


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288339999

   Are you mixing IO with CPU bound work, I wonder if you are stalling out the tokio runtime


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288634562

   I got a bit confused  myself here, but @thomasfrederikhoeck you have issues during Optimize where the data is being read differently. @tustvold,  here it seems read a Parquet object within a tokio task, should this be rayon threadpool instead?
   
   ```rust
   let stream = match operations {
               OptimizeOperations::Compact(bins) => futures::stream::iter(bins)
                   .flat_map(|(_, (partition, bins))| {
                       futures::stream::iter(bins).map(move |bin| (partition.clone(), bin))
                   })
                   .map(|(partition, files)| {
                       debug!(
                           "merging a group of {} files in partition {:?}",
                           files.len(),
                           partition,
                       );
                       for file in files.iter() {
                           debug!("  file {}", file.location);
                       }
                       let object_store_ref = log_store.object_store();
                       let batch_stream = futures::stream::iter(files.clone())
                           .then(move |file| {
                               let object_store_ref = object_store_ref.clone();
                               async move {
                                   let file_reader = ParquetObjectReader::new(object_store_ref, file);
                                   ParquetRecordBatchStreamBuilder::new(file_reader)
                                       .await?
                                       .build()
                               }
                           })
                           .try_flatten()
                           .boxed();
   
                       let rewrite_result = tokio::task::spawn(Self::rewrite_files(
                           self.task_parameters.clone(),
                           partition,
                           files,
                           log_store.object_store().clone(),
                           futures::future::ready(Ok(batch_stream)),
                       ));
                       util::flatten_join_error(rewrite_result)
                   })
                   .boxed(),
   ```


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288658303

   @tustvold thanks for the support! And insights 😄, not extreme expert on rust async yet, so I might need to look into this on how I could allocate or split up these pools.
   
   How fast do you think #6248 could land?


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288774345

   > > How fast do you think https://github.com/apache/arrow-rs/issues/6248 could land?
   > 
   > I've bashed out https://github.com/apache/arrow-rs/issues/6248, I don't have time to add tests but perhaps we don't need them - I'll leave that to the reviewers to determine.
   
   Wow that was fast :) Thanks!


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "Tangeroooo (via GitHub)" <gi...@apache.org>.
Tangeroooo commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2702853219

   @crepererum Thank you for your kind explanation!


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288558352

   That's on the chonkier end of optimal, but not ludicrous. How long do the fetches take? 


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "ion-elgreco (via GitHub)" <gi...@apache.org>.
ion-elgreco commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288583692

   Hmm what would you suggest is more optimal? Like 10MB?
   
   So now my VPN connection throughput is working fine, so it seems each fetch takes around 4-8 secs.
   
   ```rust
   python/src/filesystem.rs:501:17] elapsed.as_secs() = 6
   [python/src/filesystem.rs:473:9] (&self.path, &nbytes) = (
       Path {
           raw: "product_line_code=DUMMY/100-f1cafe66-476f-4818-8199-5c5a4a6eb4ef-0.parquet",
       },
       Some(
           33231426,
       ),
   )
   ```
   


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2288632220

   > Before [this PR](https://github.com/pola-rs/polars/pull/15083/files) in polars
   
   This is why I asked about starving the tokio threadpool, this does not appear to be the issue @ion-elgreco is running into from what he has shared.
   
   > with azcopy bench without seeing any dropped connection or something like that.
   
   Azcopy will be using multipart uploads, which uses smaller requests that are therefore less susceptible to dropped connections


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2290891044

   > To me it's an open question if every single object_store user should work around this tokio quirk or if we should have a generic solution within object_store
   
   I believe the major sticking point in the past has been around how to support streaming get requests and how that interacts with backpressure, but that definitely remains a possibility - https://github.com/apache/arrow-rs/pull/4040#issuecomment-1724082933.
   
   However, with regards to DataFusion object_store is only one example of IO that it might be performing. I doubt IOx is the only codebase that is making use of the async catalog support to perform IO. I therefore think a more holistic approach to separating IO and compute may be warranted, that would in turn obviate the need for such at the object_store level. I definitely think it is a massive footgun that DataFusion's async APIs lure people into performing IO on the same runtime as CPU-bound tasks.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "crepererum (via GitHub)" <gi...@apache.org>.
crepererum commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2337511071

   > If I understand correctly the point is that we don't want to move CPU work somewhere because that's happening in too many places to keep track. Instead we want to "special case" the IO work and move that around. Is that right?
   
   This is what we do at InfluxData and it works reasonably well. You have to be slightly careful so that you don't miss some IO calls or that you don't hand IO handles (e.g. sockets, or HTTP connections wrapping them) from the IO runtime to the CPU runtime. But other than that, it works and improves both our end2end latency and the [tokio internal metrics](https://docs.rs/tokio/latest/tokio/runtime/struct.RuntimeMetrics.html).


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2337775365

   > If we identify the CPU intensive sections of Datafusion and use `spawn_blocking` combined with a channel we could move all the blocking tasks to that separate threadpool and use the default tokio threadpool for IO.
   
   If we did this I think it is important to do performance tests -- by default tokio potentially uses many (100s I think?) of threads for this blocking thread pool and if we are not careful launching CPU bound work on them will mean the threads are over subscribed (more threads than CPUs) which will reduce effectiveness
   
   
   
   > This is what we do at InfluxData and it works reasonably well. You have to be slightly careful so that you don't miss some IO calls or that you don't hand IO handles (e.g. sockets, or HTTP connections wrapping them) from the IO runtime to the CPU runtime.
   
   It would be really helpful to document / write a blog about how this works -- I think it would be widely read and appreciated. @ion-elgreco  any interest / chance that you or someone else in the delta lake team would be able to? I would be happy to collaborate.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "JanKaul (via GitHub)" <gi...@apache.org>.
JanKaul commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2335133637

   As described in [this blogpost](https://ryhl.io/blog/async-what-is-blocking/) tokio already has two threadpools, one for normal tasks and one for blocking tasks. You can spawn tasks for the blocking threadpool by calling the [spawn_blocking](https://docs.rs/tokio/latest/tokio/task/fn.spawn_blocking.html) function. If you set the number of blocking tasks with [max_blocking_threads](https://docs.rs/tokio/latest/tokio/runtime/struct.Builder.html#method.max_blocking_threads) equal to the number of threads, this should work rather well for CPU bound tasks.
   I think this could be used as an internal threadpool for Datafusion for CPU bound tasks without requiring too much engineering overhead. If we identify the CPU intensive sections of Datafusion and use `spawn_blocking` combined with a channel we could move all the blocking tasks to that separate threadpool and use the default tokio threadpool for IO.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "zalmane (via GitHub)" <gi...@apache.org>.
zalmane commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2338010277

   I see. Even though the trace points to pyarrow? I was under the impression that when reading the table itself, delta-rs is no longer in the middle:
   ```
     File "pyarrow/_dataset.pyx", line 562, in pyarrow._dataset.Dataset.to_table
     File "pyarrow/_dataset.pyx", line 3804, in pyarrow._dataset.Scanner.to_table
     File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
     File "pyarrow/error.pxi", line 88, in pyarrow.lib.check_status
   OSError: Generic MicrosoftAzure error: error decoding response body
   , Message: Generic MicrosoftAzure error: error decoding response body
   ```


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2338019830

   > Even though the trace points to pyarrow
   > Should I repost this on the datafusion issue or do you think this is different and is related to pyarrow/arrow-rs
   
   The issue pertains to how CPU bound work is starving IO, this side-channel will not be reflected in stack traces. Additionally there is something in-between that is connecting pyarrow to object_store, we don't provide such an integration. The delta-rs people will likely be best placed to comment on what this is.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2341719676

   > What I still don't quite get is that we are still seeing errors but only on the reading side through the DeltaFileHandler which is exposed into a pyarrow filesystem, there should be zero cpu bound tasks on that tokio runtime
   
   Perhaps it is related to just some networks errors and a retry of streaming and  #6287 tracks retrying interrupted streaming requests
   


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "thomasfrederikhoeck (via GitHub)" <gi...@apache.org>.
thomasfrederikhoeck commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2185932055

   @Xuanwo I would love to be of more help but I don't now how to do this in delta-rs (an in turn object_store). I didn't help setting the timeout to 300s. 
   
   @ion-elgreco Can you point me in the direction of how I can provide better logs?


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] `error decoding response body` after upgrade to object store 0.10 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5882:
URL: https://github.com/apache/arrow-rs/issues/5882#issuecomment-2703788145

   > The essence is described in https://github.com/apache/arrow-rs/pull/6519#issuecomment-2621505087 or in my words: The object_store interface returns a stream of data. If that stream fails midway (e.g. because there's a timeout or a network glitch)
   
   Since this keeps coming up, I filed a separate ticket to track
   - https://github.com/apache/arrow-rs/issues/7242


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org