File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2120,7 +2120,12 @@ class spark_resource_adaptor_impl {
21202120 } catch (rmm::out_of_memory const & e) {
21212121 // rmm::out_of_memory is what is thrown when an allocation failed
21222122 // but there are other rmm::bad_alloc exceptions that could be
2123- // thrown as well, which are handled by the std::exception case.
2123+ // thrown as well, which are handled by the std::bad_alloc case below.
2124+ if (!post_alloc_failed (tid, true , likely_spill)) { throw ; }
2125+ } catch (std::bad_alloc const & e) {
2126+ // Treat std::bad_alloc (including rmm::bad_alloc that is not
2127+ // rmm::out_of_memory) as a recoverable allocation failure, allowing
2128+ // the retry path used for rmm::out_of_memory.
21242129 if (!post_alloc_failed (tid, true , likely_spill)) { throw ; }
21252130 } catch (std::exception const & e) {
21262131 post_alloc_failed (tid, false , likely_spill);
You can’t perform that action at this time.
0 commit comments